Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

action is skipped, why? #81

Open
cenit opened this issue Jun 21, 2021 · 2 comments
Open

action is skipped, why? #81

cenit opened this issue Jun 21, 2021 · 2 comments

Comments

@cenit
Copy link

cenit commented Jun 21, 2021

as per title, can anyone please help me understand why action is skipped here?
I have never seen it working correctly on this repo

https://github.com/AlexeyAB/darknet/actions/runs/956515006

link to comment that triggered the skipped run: AlexeyAB/darknet#792 (comment)

this is the yml in the repository. Note that I am not interested in CI automatically triggering afterwards, just rebasing to work

name: Automatic Rebase
on:
  issue_comment:
    types: [created]
jobs:
  rebase:
    name: Rebase
    if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'CONTRIBUTOR')
    runs-on: ubuntu-latest
    steps:
      - name: Checkout the latest code
        uses: actions/checkout@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
      - name: Automatic Rebase
        uses: cirrus-actions/rebase@1.5
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@vikram-katkar
Copy link

Probably, workflow flie must be on default branch already unlike other trigger event.
https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#issue_comment

@cenit
Copy link
Author

cenit commented Nov 29, 2021

the event appears in Actions, it's not "not run". It just writes "Status: skipped", as if the condition

    if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'CONTRIBUTOR')

is always false, which is impossible to me... if I write /rebase in a PR comment, and I am member, owner or contributor it should run the action, not skip it....

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

No branches or pull requests

2 participants