Skip to content

Commit

Permalink
Another way to trigger on tag/releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwoberts committed Aug 24, 2024
1 parent d0ab7dc commit 10c9678
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: build

on:
release:
types: [created]
push:
branches:
- main
tags:
- "v*" # Triggers on version tags like v1.0.0
pull_request:
branches:
- main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
cache-to: type=gha,mode=max

- name: build and push docker image (push branch)
if: ${{ github.event.workflow_run.event == 'push' && !startsWith(github.ref, 'refs/tags/') }}
if: ${{ github.event.workflow_run.event == 'push' }}
uses: docker/build-push-action@v3
with:
push: true
Expand All @@ -58,7 +58,7 @@ jobs:
cache-to: type=gha,mode=max

- name: build and push docker image (push tag)
if: ${{ github.event.workflow_run.event == 'push' && startsWith(github.ref, 'refs/tags/') }}
if: ${{ github.event.workflow_run.event == 'release' }}
uses: docker/build-push-action@v3
with:
push: true
Expand Down

0 comments on commit 10c9678

Please sign in to comment.