action
This commit is contained in:
1 parent
aa282439fc
commit
60e50cb5db
1 file changed
+54
@@ -0,0 +1,54 @@
|
||||
name: Build images (feat/saas)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["feat/saas"]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
PLATFORMS: linux/amd64,linux/arm64
|
||||
TAG: latest
|
||||
IMAGE_CLIENT: ghcr.io/ajhollid/checkmate-saas-client
|
||||
IMAGE_SERVER: ghcr.io/ajhollid/checkmate-saas-server
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Docker Buildx (multiarch)
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
install: true
|
||||
driver-opts: |
|
||||
network=host
|
||||
buildkitd-flags: --debug
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ secrets.GHCR_USER }}
|
||||
password: ${{ secrets.GHCR_AJHOLLID_TOKEN }}
|
||||
|
||||
- name: Build and push Client (multi-arch)
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: client
|
||||
file: client/Dockerfile
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
push: true
|
||||
tags: ${{ env.IMAGE_CLIENT }}:${{ env.TAG }}
|
||||
|
||||
- name: Build and push Server (multi-arch)
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: server
|
||||
file: server/Dockerfile
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
push: true
|
||||
tags: ${{ env.IMAGE_SERVER }}:${{ env.TAG }}
|
||||
Reference in new issue
Block a user