Skip to content

Commit 5439469

Browse files
committed
build-and-deploy: optionally skip creating a check-run
The check-run that is created in the "other" repository's PR is quite neat, but for debugging it is less helpful. Let's introduce a knob that can be turned off by committing a change to make debugging/developing this workflow easier. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 349e4e1 commit 5439469

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ env:
3333
GPG_OPTIONS: "--batch --yes --no-tty --list-options no-show-photos --verify-options no-show-photos --pinentry-mode loopback"
3434
HOME: "${{ github.workspace }}\\home"
3535
ACTOR: "${{ github.event.inputs.actor || github.triggering_actor }}"
36+
CREATE_CHECK_RUN: true
3637

3738
jobs:
3839
build:
@@ -48,6 +49,7 @@ jobs:
4849
# Therefore, we registered a GitHub App and stored the data required to
4950
# act as that App in repository secrets `GH_APP_ID`, `GH_APP_PRIVATE_KEY`.
5051
- name: Obtain installation token
52+
if: env.CREATE_CHECK_RUN != 'false'
5153
id: setup
5254
uses: actions/github-script@v6
5355
with:
@@ -76,6 +78,7 @@ jobs:
7678
core.setOutput('token', accessToken)
7779
7880
- name: get check run id
81+
if: env.CREATE_CHECK_RUN != 'false'
7982
id: check-run
8083
uses: actions/github-script@v6
8184
with:
@@ -225,6 +228,7 @@ jobs:
225228
fi
226229
227230
- name: update check-run
231+
if: env.CREATE_CHECK_RUN != 'false'
228232
uses: actions/github-script@v6
229233
with:
230234
script: |
@@ -268,7 +272,7 @@ jobs:
268272
run: rm -rf home
269273

270274
- name: mark check run as completed
271-
if: always()
275+
if: env.CREATE_CHECK_RUN != 'false' && always()
272276
uses: actions/github-script@v6
273277
with:
274278
script: |

0 commit comments

Comments
 (0)