chore: improve pipeline
This commit is contained in:
@@ -28,6 +28,7 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node_version: 20
|
node_version: 20
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -68,6 +69,7 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node_version: 20
|
node_version: 20
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -79,12 +81,28 @@ jobs:
|
|||||||
pnpm release:tag
|
pnpm release:tag
|
||||||
|
|
||||||
build-images:
|
build-images:
|
||||||
name: 🐳 Build & Push Images
|
name: 🐳 Build ${{ matrix.name }}
|
||||||
needs: qa
|
needs: qa
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:act-latest
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- image: nextjs
|
||||||
|
file: packages/infra/docker/Dockerfile.nextjs
|
||||||
|
name: Build-Base
|
||||||
|
- image: runtime
|
||||||
|
file: packages/infra/docker/Dockerfile.runtime
|
||||||
|
name: Production Runtime
|
||||||
|
- image: gatekeeper
|
||||||
|
file: packages/infra/docker/Dockerfile.gatekeeper
|
||||||
|
name: Gatekeeper (Product)
|
||||||
|
- image: directus
|
||||||
|
file: packages/infra/docker/Dockerfile.directus
|
||||||
|
name: Directus (Base)
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -99,58 +117,19 @@ jobs:
|
|||||||
username: ${{ secrets.REGISTRY_USER }}
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
password: ${{ secrets.REGISTRY_PASS }}
|
password: ${{ secrets.REGISTRY_PASS }}
|
||||||
|
|
||||||
- name: 🏗️ Build & Push Nextjs Build-Base
|
- name: 🏗️ Build & Push ${{ matrix.name }}
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: packages/infra/docker/Dockerfile.nextjs
|
file: ${{ matrix.file }}
|
||||||
platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
pull: true
|
pull: true
|
||||||
push: true
|
push: true
|
||||||
secrets: |
|
secrets: |
|
||||||
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
|
||||||
tags: |
|
tags: |
|
||||||
registry.infra.mintel.me/mintel/nextjs:${{ github.ref_name }}
|
registry.infra.mintel.me/mintel/${{ matrix.image }}:${{ github.ref_name }}
|
||||||
registry.infra.mintel.me/mintel/nextjs:latest
|
registry.infra.mintel.me/mintel/${{ matrix.image }}:latest
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
- name: 🏗️ Build & Push Production Runtime
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: packages/infra/docker/Dockerfile.runtime
|
|
||||||
platforms: linux/arm64
|
|
||||||
pull: true
|
|
||||||
push: true
|
|
||||||
secrets: |
|
|
||||||
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
|
|
||||||
tags: |
|
|
||||||
registry.infra.mintel.me/mintel/runtime:${{ github.ref_name }}
|
|
||||||
registry.infra.mintel.me/mintel/runtime:latest
|
|
||||||
|
|
||||||
- name: 🏗️ Build & Push Gatekeeper (Product)
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: packages/infra/docker/Dockerfile.gatekeeper
|
|
||||||
platforms: linux/arm64
|
|
||||||
pull: true
|
|
||||||
push: true
|
|
||||||
secrets: |
|
|
||||||
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
|
|
||||||
tags: |
|
|
||||||
registry.infra.mintel.me/mintel/gatekeeper:${{ github.ref_name }}
|
|
||||||
registry.infra.mintel.me/mintel/gatekeeper:latest
|
|
||||||
|
|
||||||
- name: 🏗️ Build & Push Directus (Base)
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: packages/infra/docker/Dockerfile.directus
|
|
||||||
platforms: linux/arm64
|
|
||||||
pull: true
|
|
||||||
push: true
|
|
||||||
secrets: |
|
|
||||||
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
|
|
||||||
tags: |
|
|
||||||
registry.infra.mintel.me/mintel/directus:${{ github.ref_name }}
|
|
||||||
registry.infra.mintel.me/mintel/directus:latest
|
|
||||||
|
|||||||
Reference in New Issue
Block a user