Skip to content

Commit 18467c2

Browse files
committed
workflows: Add label on CI check failures
Automatically add label so broken PR wont go to staging Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
1 parent 8caf290 commit 18467c2

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/main.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,19 @@ jobs:
4848
- name: Run basic yaml validation
4949
run: |
5050
python tests/validate_yaml.py
51-
51+
on-fail:
52+
if: failure() && github.event_name == 'pull_request'
53+
runs-on: ubuntu-latest
54+
needs: check
55+
steps:
56+
- name: Add label to PR
57+
uses: actions/github-script@v7
58+
with:
59+
script: |
60+
const label = 'staging-skip';
61+
github.rest.issues.addLabels({
62+
owner: context.repo.owner,
63+
repo: context.repo.repo,
64+
issue_number: context.issue.number,
65+
labels: [label]
66+
});

0 commit comments

Comments
 (0)