Skip to content

Commit

Permalink
add buildx to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-gaitzsch committed Apr 30, 2024
1 parent e484ed4 commit 930eb7c
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
runs-on: ubuntu-latest
needs: build-and-test
if: github.ref == 'refs/heads/main'
strategy:
matrix:
variant: [{dockerfile: Dockerfile, tagSuffix: ''}, {dockerfile: Dockerfile.unprivileged, tagSuffix: '-unprivileged'}, {dockerfile: Dockerfile.withoutPlayground, tagSuffix: '-without-playground'}]
steps:
- name: Set version to env
run: |
Expand All @@ -53,33 +56,17 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push docker image with playground
- name: Build and push docker image
uses: docker/build-push-action@v2
with:
platforms: linux/amd64, linux/arm64
file: ./${{ matrix.variant.dockerfile }}
context: ./
tags: |
lucasgaitzsch/pdf-turtle:latest
lucasgaitzsch/pdf-turtle:v${{ env.VERSION }}
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:v${{ env.VERSION }}
lucasgaitzsch/pdf-turtle:latest-playground
lucasgaitzsch/pdf-turtle:v${{ env.VERSION }}-playground
ghcr.io/${{ github.repository }}:latest-playground
ghcr.io/${{ github.repository }}:v${{ env.VERSION }}-playground
push: true

- name: Build and push docker image with playground and unprivileged
uses: docker/build-push-action@v2
with:
platforms: linux/amd64, linux/arm64
file: ./Dockerfile.unprivileged
context: ./
tags: |
lucasgaitzsch/pdf-turtle:latest-unprivileged
lucasgaitzsch/pdf-turtle:v${{ env.VERSION }}-unprivileged
ghcr.io/${{ github.repository }}:latest-unprivileged
ghcr.io/${{ github.repository }}:v${{ env.VERSION }}-unprivileged
lucasgaitzsch/pdf-turtle:latest${{ matrix.variant.tagSuffix }}
lucasgaitzsch/pdf-turtle:v${{ env.VERSION }}${{ matrix.variant.tagSuffix }}
ghcr.io/${{ github.repository }}:latest${{ matrix.variant.tagSuffix }}
ghcr.io/${{ github.repository }}:v${{ env.VERSION }}${{ matrix.variant.tagSuffix }}
push: true

- name: Build and push docker image without playground
Expand Down

0 comments on commit 930eb7c

Please sign in to comment.