Skip to content

Commit

Permalink
workflows: Add label on CI check failures
Browse files Browse the repository at this point in the history
Automatically add label so broken PR wont go to staging

Signed-off-by: Denys Fedoryshchenko <[email protected]>
  • Loading branch information
nuclearcat committed Jul 24, 2024
1 parent 8caf290 commit 18467c2
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,19 @@ jobs:
- name: Run basic yaml validation
run: |
python tests/validate_yaml.py
on-fail:
if: failure() && github.event_name == 'pull_request'
runs-on: ubuntu-latest
needs: check
steps:
- name: Add label to PR
uses: actions/github-script@v7
with:
script: |
const label = 'staging-skip';
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: [label]
});

0 comments on commit 18467c2

Please sign in to comment.