Skip to content

Commit

Permalink
refine conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
dthomasngrokker committed Jan 24, 2025
1 parent 893da43 commit f2f83f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/snap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on: # The event that triggers the workflow
jobs:
build:
# Only run this job if the branch name contains "release" or a commit is created on master branch and the branch name contains "release" or manually triggered
if: contains(github.head_ref, 'release') || (github.event_name == 'push' && github.ref == 'refs/heads/master' && contains(github.head_ref, 'release')) || github.event_name == 'workflow_dispatch'
if: contains(github.head_ref, 'release') || contains(github.ref, 'release') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
outputs:
snap-file: ${{ steps.build-snap.outputs.snap }}
Expand Down Expand Up @@ -40,8 +40,8 @@ jobs:
path: ${{ steps.build-snap.outputs.snap }}

publish:
# Only run this job when a commit is created on master branch and the branch name contains 'release' or manually triggered
if: (github.event_name == 'push' && github.ref == 'refs/heads/master' && contains(github.head_ref, 'release')) || github.event_name == 'workflow_dispatch'
# Only run this job if the branch name contains "release" or a commit is created on master branch and the branch name contains "release" or manually triggered
if: contains(github.head_ref, 'release') || contains(github.ref, 'release') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
needs: build # Wait for build job to be done
steps:
Expand Down

0 comments on commit f2f83f6

Please sign in to comment.