@@ -97,12 +97,21 @@ jobs:
9797 core.setOutput('head_sha', pr.head.sha);
9898
9999 - name : Set build status as pending
100- uses : myrotvorets/set-commit-status-action@master
101- with :
102- sha : ${{ steps.get_pr_data.outputs.head_sha }}
103- context : ${{ github.workflow }} / Build / ${{ matrix.arch }}
104- targetUrl : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ job.check_run_id }}?pr=${{ inputs.pr_number }}
105- status : pending
100+ env :
101+ # Token needs statuses: write
102+ TOKEN : ${{ secrets.GITHUB_TOKEN }}
103+ API_URL : https://api.github.com/repos/${{ github.repository }}/statuses/${{ steps.get_pr_data.outputs.head_sha }}
104+ CONTEXT : ${{ github.workflow }} / Build / ${{ matrix.arch }}
105+ OUTCOME : pending
106+ TARGET_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ job.check_run_id }}?pr=${{ inputs.pr_number }}
107+ run : |
108+ curl -L \
109+ -X POST \
110+ -H "Accept: application/vnd.github+json" \
111+ -H "Authorization: Bearer $TOKEN" \
112+ -H "X-GitHub-Api-Version: 2022-11-28" \
113+ "$API_URL" \
114+ -d '{"state":"'"$OUTCOME"'","target_url":"'"$TARGET_URL"'","context":"'"$CONTEXT"'"}'
106115
107116 - uses : actions/checkout@v6
108117 with :
@@ -164,12 +173,26 @@ jobs:
164173 V : s
165174
166175 - name : Set final build status
167- uses : myrotvorets/set-commit-status-action@master
168- with :
169- sha : ${{ steps.get_pr_data.outputs.head_sha }}
170- context : ${{ github.workflow }} / Build / ${{ matrix.arch }}
171- targetUrl : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ job.check_run_id }}?pr=${{ inputs.pr_number }}
172- status : ${{ steps.build.outcome }}
176+ env :
177+ # Token needs statuses: write
178+ TOKEN : ${{ secrets.GITHUB_TOKEN }}
179+ API_URL : https://api.github.com/repos/${{ github.repository }}/statuses/${{ steps.get_pr_data.outputs.head_sha }}
180+ CONTEXT : ${{ github.workflow }} / Build / ${{ matrix.arch }}
181+ OUTCOME : ${{ steps.build.outcome }}
182+ TARGET_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ job.check_run_id }}?pr=${{ inputs.pr_number }}
183+ run : |
184+ case $OUTCOME in
185+ success) state="success" ;;
186+ *) state="failure" ;;
187+ esac
188+
189+ curl -L \
190+ -X POST \
191+ -H "Accept: application/vnd.github+json" \
192+ -H "Authorization: Bearer $TOKEN" \
193+ -H "X-GitHub-Api-Version: 2022-11-28" \
194+ "$API_URL" \
195+ -d '{"state":"'"$state"'","target_url":"'"$TARGET_URL"'","context":"'"$CONTEXT"'"}'
173196
174197 - name : Move created packages to project dir
175198 if : always()
@@ -259,12 +282,21 @@ jobs:
259282
260283 - name : Set test status as pending
261284 if : ${{ matrix.runtime_test && fromJSON(env.HAVE_PKGS) }}
262- uses : myrotvorets/set-commit-status-action@master
263- with :
264- sha : ${{ steps.get_pr_data.outputs.head_sha }}
265- context : ${{ github.workflow }} / Test / ${{ matrix.arch }}
266- targetUrl : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ job.check_run_id }}?pr=${{ inputs.pr_number }}
267- status : pending
285+ env :
286+ # Token needs statuses: write
287+ TOKEN : ${{ secrets.GITHUB_TOKEN }}
288+ API_URL : https://api.github.com/repos/${{ github.repository }}/statuses/${{ steps.get_pr_data.outputs.head_sha }}
289+ CONTEXT : ${{ github.workflow }} / Test / ${{ matrix.arch }}
290+ OUTCOME : pending
291+ TARGET_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ job.check_run_id }}?pr=${{ inputs.pr_number }}
292+ run : |
293+ curl -L \
294+ -X POST \
295+ -H "Accept: application/vnd.github+json" \
296+ -H "Authorization: Bearer $TOKEN" \
297+ -H "X-GitHub-Api-Version: 2022-11-28" \
298+ "$API_URL" \
299+ -d '{"state":"'"$OUTCOME"'","target_url":"'"$TARGET_URL"'","context":"'"$CONTEXT"'"}'
268300
269301 - name : Register QEMU
270302 if : ${{ matrix.runtime_test && fromJSON(env.HAVE_PKGS) }}
@@ -305,9 +337,23 @@ jobs:
305337
306338 - name : Set final test status
307339 if : ${{ always() && matrix.runtime_test && steps.test.outcome != 'skipped' }}
308- uses : myrotvorets/set-commit-status-action@master
309- with :
310- sha : ${{ steps.get_pr_data.outputs.head_sha }}
311- context : ${{ github.workflow }} / Test / ${{ matrix.arch }}
312- targetUrl : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ job.check_run_id }}?pr=${{ inputs.pr_number }}
313- status : ${{ steps.test.outcome }}
340+ env :
341+ # Token needs statuses: write
342+ TOKEN : ${{ secrets.GITHUB_TOKEN }}
343+ API_URL : https://api.github.com/repos/${{ github.repository }}/statuses/${{ steps.get_pr_data.outputs.head_sha }}
344+ CONTEXT : ${{ github.workflow }} / Test / ${{ matrix.arch }}
345+ OUTCOME : ${{ steps.test.outcome }}
346+ TARGET_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ job.check_run_id }}?pr=${{ inputs.pr_number }}
347+ run : |
348+ case $OUTCOME in
349+ success) state="success" ;;
350+ *) state="failure" ;;
351+ esac
352+
353+ curl -L \
354+ -X POST \
355+ -H "Accept: application/vnd.github+json" \
356+ -H "Authorization: Bearer $TOKEN" \
357+ -H "X-GitHub-Api-Version: 2022-11-28" \
358+ "$API_URL" \
359+ -d '{"state":"'"$state"'","target_url":"'"$TARGET_URL"'","context":"'"$CONTEXT"'"}'
0 commit comments