autoupdate
autoupdate copied to clipboard
Does not trigger github workflow after auto update merge
Hi there, our required workflow doesn't get triggered after autoupdate. It says Expected - Waiting for status to be reported
. Look at the attachment.
![Screen Shot 2022-07-18 at 1 33 05 PM](https://user-images.githubusercontent.com/51537954/179612445-01c499b1-df52-46a7-93e9-a9ee7d6fb96b.png)
Here's our autoupdate.yaml file
name: autoupdate
on:
pull_request:
types: [auto_merge_enabled]
jobs:
autoupdate:
name: autoupdate
runs-on: ubuntu-18.04
steps:
- uses: docker://chinthakagodawita/autoupdate-action:v1
id: autoupdate
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
MERGE_CONFLICT_ACTION: 'fail'
- run: echo 'Merge conflicts found!'
if: ${{ steps.autoupdate.outputs.conflicted }}
- run: echo 'No merge conflicts'
if: ${{ !steps.autoupdate.outputs.conflicted }}
Here's our beginning of not triggered workflow yaml file if you want to see events that suppose to trigger the workflow. Any idea?
name: Build
on:
push:
pull_request:
types: [opened]
jobs:
test:
...
build:
@mertnacakgedigi I believe this is expected, but I discovered that you could actually use a Personal Access Token (PAT) instead of GITHUB_TOKEN
which should do the trick.
Would looks something like this:
name: autoupdate
on:
pull_request:
types: [auto_merge_enabled]
jobs:
autoupdate:
name: autoupdate
runs-on: ubuntu-18.04
steps:
- uses: docker://chinthakagodawita/autoupdate-action:v1
id: autoupdate
env:
GITHUB_TOKEN: '${{ secrets.MY_PAT }}'
MERGE_CONFLICT_ACTION: 'fail'
- run: echo 'Merge conflicts found!'
if: ${{ steps.autoupdate.outputs.conflicted }}
- run: echo 'No merge conflicts'
if: ${{ !steps.autoupdate.outputs.conflicted }}
I think it's still a good idea to have this issue, but instead, the README should be updated to talk about this alternative authentication token.
Hm, actually maybe GITHUB_TOKEN
permissions can be modified: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
Created a feature request discussion to hopefully get GitHub to make this a bit clearer: https://github.com/github-community/community/discussions/21091
Thanks @Julian88Tex. We don't prefer using PAT for our organization. I'm still looking for a workaround for this.
Using Personal Access Token triggers the subsequence workflows. Thanks @Julian88Tex