Skip to content

Commit

Permalink
Only push latest on release versions
Browse files Browse the repository at this point in the history
  • Loading branch information
EpicWink committed Mar 19, 2024
1 parent d07185f commit 02bdb3e
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: tests/test-docker-image.sh
"epicwink/proxpi:${{ env.REF_SLUG }}-${{ matrix.platform.image-suffix }}"

build-and-release:
build-and-publish:
if: ${{ github.event_name == 'release' }}
needs: ['build-and-test']
runs-on: ubuntu-latest
Expand All @@ -82,4 +82,19 @@ jobs:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: epicwink/proxpi:${{ github.ref_name }},epicwink/proxpi:latest
tags: epicwink/proxpi:${{ github.ref_name }}

- name: Check tag
id: check-tag
run: |
if [[ "${{ github.ref_name }}" =~ '^v\d+\.\d+\.\d+$' ]]; then
echo ::set-output name=match::true
fi
- name: Push all architectures
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: epicwink/proxpi:latest

0 comments on commit 02bdb3e

Please sign in to comment.