Skip to content

Commit

Permalink
ci: add matrix + tags
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingKoopa committed Jan 10, 2024
1 parent 3ba3bfb commit 10b662d
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,22 @@ on:
jobs:
build_deploy:
runs-on: 'ubuntu-22.04'
strategy:
matrix:
image:
[
{ dockerfile: 'Dockerfile.pnpm', target: 'prep' },
{ dockerfile: 'Dockerfile.pnpm', target: 'home' },
{ dockerfile: 'Dockerfile.postgres', tag: 'postgres' }
]
# See: https://github.com/docker/build-push-action
steps:
- name: Generate Docker tags
uses: docker/metadata-action@v5
with:
images: 'hackbu/${{ matrix.image.target || matrix.image.tag }}'
tags: type=sha
flavor: latest=true
# Docs: https://github.com/docker/setup-qemu-action
- name: 'Setup QEMU to emulate other platforms'
uses: 'docker/setup-qemu-action@v3'
Expand All @@ -21,7 +35,10 @@ jobs:
- name: 'Build and push'
uses: 'docker/build-push-action@v5'
with:
file: './docker/Dockerfile.pnpm'
file: './docker/${{ matrix.image.dockerfile }}'
target: '${{ matrix.image.target }}'
platforms: 'linux/amd64,linux/arm64'
# TODO
push: 'false'
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.tags }}

0 comments on commit 10b662d

Please sign in to comment.