disable workflow on protected branch #271
-
accordoing to the doc: https://github.com/stefanzweifel/git-auto-commit-action#commits-made-by-this-action-do-not-trigger-new-workflow-runs I have to set the PAT to push on protected branch. Sadly it triggers workflow unexpectdly : https://github.com/stefanzweifel/git-auto-commit-action#commits-made-by-this-action-do-not-trigger-new-workflow-runs What can I do to disable workflow on protected branch please? Here is my workflow: https://github.com/gogo2464/cryptatools-rs/blob/master/.github/workflows/deploy-pypi-on-windows.yml#L44 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 16 replies
-
If you're using a PAT you're responsible for guarding your workflows from unexpected runs. name: Deploy
on:
push:
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
# Run this job if the commit message is not equal to "Change version with bump2version"
if: github.event.head_commit.message != 'Change version with bump2version'
steps:
- run: # Deploy code
See: |
Beta Was this translation helpful? Give feedback.
-
I removed the --amend and then I can not see if a previous commit has failure yet. Could you check out https://github.com/gogo2464/cryptatools-rs please? |
Beta Was this translation helpful? Give feedback.
-
@stefanzweifel do you see what I mean? |
Beta Was this translation helpful? Give feedback.
If you're using a PAT you're responsible for guarding your workflows from unexpected runs.
For example, you can add a
if
-clause on the job level like this.See: