Skip to content

Commit 67651e4

Browse files
ci: use github script instead of action-label
1 parent ca2ba06 commit 67651e4

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.github/workflows/awesome_workflow.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,16 @@ jobs:
6666
cmake --build build --parallel 4
6767
6868
- name: Label on PR fail
69-
uses: actions-ecosystem/action-add-labels@v1
69+
uses: actions/github-script@v4
7070
if: ${{ failure() && matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' }}
7171
with:
72-
labels: "automated build is failing"
73-
72+
script: |
73+
await github.issues.addLabels({
74+
owner: context.repo.owner,
75+
repo: context.repo.repo,
76+
issue_number: context.issue.number,
77+
labels: ['automated build is failing']
78+
})
7479
test:
7580
name: Testing pull request
7681
runs-on: ${{ matrix.os }}
@@ -100,7 +105,13 @@ jobs:
100105
ctest --test-dir build --timeout 5 --parallel 4
101106
102107
- name: Label on PR fail
103-
uses: actions-ecosystem/action-add-labels@v1
108+
uses: actions/github-script@v4
104109
if: ${{ failure() && github.event_name == 'pull_request' }}
105110
with:
106-
labels: "automated tests are failing"
111+
script: |
112+
await github.issues.addLabels({
113+
owner: context.repo.owner,
114+
repo: context.repo.repo,
115+
issue_number: context.issue.number,
116+
labels: ['automated tests are failing']
117+
})

0 commit comments

Comments
 (0)