Workflow is not triggered from "Synchronize" event from a commit from GitHub Actions #2084
Replies: 2 comments
-
|
@joshkotrous Your question is 2 years old but I came across this while trying to debug the same type of issue. This action has some documentation around this behavior: https://github.com/EndBug/add-and-commit#the-commit-from-the-action-is-not-triggering-ci In short, if a workflow checks out and commits with the default action token, "GitHub sees that the push event has been triggered by a commit generated by CI, and doesn't run any further checks to avoid unintentional check loops." Solution as described there is to use a personal access token (PAT) or Github App token to do the check out and commit. |
Beta Was this translation helpful? Give feedback.
-
|
I am also trying to resolve why a GHA is not triggering a synchronize event, but I'm pretty sure my workflow uses a Github App token to create the commit and it still does not trigger the event: - name: Generate multi-repo token
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.CPR_APP_ID }}
private-key: ${{ secrets.CPR_APP_SECRET }}
repositories: |
repo1
repo2
# other steps...
- name: Commit and push to existing branch
if: steps.discover.outputs.should_proceed == 'true' && steps.branch-check.outputs.branch_exists == 'true'
env:
NEXT_BRANCH: ${{ steps.discover.outputs.next_env_branch }}
# Is this not passing in the Github App token?
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
GH_REPO: ${{ github.repository }}
ENV: ${{ steps.discover.outputs.next_env }}
run: |
set -euo pipefail
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GH_REPO}.git"
git add -A
git commit -m "test"
git push origin "$NEXT_BRANCH" |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a pipeline setup in this repository: https://github.com/joshkotrous/developer-portfolio-v1 that is supposed to trigger based off of the Synchronize event on PRs to master. I am using another workflow to update the version number in the package.json file and commit this to the repo. For some reason this commit does not trigger the Synchronize action. Committing from my account does trigger the action:

Is this an issue or incompatibility specifically to commits from GitHub Actions?
Beta Was this translation helpful? Give feedback.
All reactions