Skip to content

Commit

Permalink
chore(ci): use matrix to separate slim and distrib build
Browse files Browse the repository at this point in the history
  • Loading branch information
ncarlier committed Jan 20, 2024
1 parent 8ea4262 commit 8b4ef96
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ jobs:
publish:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
include:
- target: slim
suffix: ''
- target: distrib
suffix: -distrib
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -69,7 +77,8 @@ jobs:
images: ncarlier/webhookd
tags: |
type=edge
type=semver,pattern={{version}}
type=semver,pattern={{major}},suffix=${{ matrix.suffix }}
type=semver,pattern={{version}},suffix=${{ matrix.suffix }}
- uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
Expand All @@ -80,21 +89,12 @@ jobs:
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push Docker image (slim)
- name: Build and push Docker image (${{ matrix.target }})
uses: docker/build-push-action@v2
with:
context: .
target: slim
target: ${{ matrix.target }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image (distrib)
uses: docker/build-push-action@v2
with:
context: .
target: distrib
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}-distrib
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 8b4ef96

Please sign in to comment.