on a private GitHub repository of our Organization, we're using the labeler github action to give our PRs tags based on which files are modified:
name: "Pull Request Labeler"
on:
- pull_request
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
It works fine, the correct labels are applied.
We also use the auto-assign-action to assign specific people as reviewers, based on the labels of the PRs:
name: 'Auto Assign'
on:
pull_request:
types: [labeled, unlabeled]
jobs:
add-reviews-dev:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected]
with:
configuration-path: '.github/auto_assign_dev.yml'
add-reviews-art:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected]
with:
configuration-path: '.github/auto_assign_art.yml'
Unfortunately, that second github action is never executed when the first one adds labels.
But if I manually remove the labels that the first action added, and re-apply them again, then the second action is triggered and sets the reviewers correctly.
I also tried to:
add-reviews-dev
and add-reviews-art
in the same pipeline as the label (using the needs
keyword to make sure they are executed after)auto-assign
action from the labeler
action with the uses
keyword in the latter and the workflow_call
keyword in the formerBut those two tries were not successful.
Is there a way to do that?
GitHub actions will not trigger on any changes made by an action that uses the GIDHUB_TOKEN that's set by the agent. GitHub recognizes this as an action token and won't trigger any new workflows to prevent cascades.
You have a few options: