diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2023-01-09 16:03:20 -0500 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2025-08-18 11:51:29 -0400 |
| commit | 8d6559e0bfba603431af4d4a252a120a593e4f04 (patch) | |
| tree | 0cfc5cb2add58a7b0ef0d0fa6ae60a64d2558ba8 /.github | |
| parent | 8b6bf5ac9e7c80d84771c8158fe670b44c4afa15 (diff) | |
| download | pantry-8d6559e0bfba603431af4d4a252a120a593e4f04.tar.gz pantry-8d6559e0bfba603431af4d4a252a120a593e4f04.tar.bz2 pantry-8d6559e0bfba603431af4d4a252a120a593e4f04.zip | |
Use multistage by default; fix tags
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/build.yml | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 82188ba..565adde 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,10 @@ name: Pantry build on: push: - branches: [ "trunk" ] + branches: + - trunk + tags: + - v* env: IMAGE_NAME: ${{ github.repository }} @@ -12,10 +15,6 @@ jobs: runs-on: ubuntu-latest - strategy: - matrix: - image-type: [ native, multistage ] - steps: - uses: actions/checkout@v3 @@ -55,14 +54,19 @@ jobs: uses: docker/metadata-action@v4 with: images: ${{ env.IMAGE_NAME }} + tags: | + type=pep440,pattern={{version}} + type=pep440,pattern={{major}}.{{minor}} + type=pep440,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} + type=ref,event=branch - name: Build and push Docker image id: build-and-push uses: docker/build-push-action@v3 with: context: . push: true - file: src/main/docker/Dockerfile.${{ matrix.image-type }} - tags: ${{ env.IMAGE_NAME }}:${{ matrix.image-type }} + file: src/main/docker/Dockerfile.multistage + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max |
