Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not trigger github workflow after auto update merge #321

Closed
mertnacakgedigi opened this issue Jul 18, 2022 · 5 comments
Closed

Does not trigger github workflow after auto update merge #321

mertnacakgedigi opened this issue Jul 18, 2022 · 5 comments

Comments

@mertnacakgedigi
Copy link

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

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 mertnacakgedigi changed the title Does not github actions after auto update merge Does not trigger github workflow after auto update merge Jul 18, 2022
@Julian88Tex
Copy link

@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.

@Julian88Tex
Copy link

@Julian88Tex
Copy link

Created a feature request discussion to hopefully get GitHub to make this a bit clearer: community/community#21091

@mertnacakgedigi
Copy link
Author

mertnacakgedigi commented Sep 7, 2022

Thanks @Julian88Tex. We don't prefer using PAT for our organization. I'm still looking for a workaround for this.

@mertnacakgedigi
Copy link
Author

Using Personal Access Token triggers the subsequence workflows. Thanks @Julian88Tex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants