Skip to content

Commit a30b97c

Browse files
committed
Move check-tokens job to the start and allow it while workflow debugging, hopefully correct the outputs of check-tokens
correction to debug-check-tokens move check-tokens to start of build for faster debugging Try alternative check-tokens make check-tokens run even when debugging Have to add a step so trying to see if I can add a debug step `outputs` doesn't exist, just add a useless dummy step Print out states rather than having a totally dummy job
1 parent 804f12b commit a30b97c

File tree

1 file changed

+32
-37
lines changed

1 file changed

+32
-37
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,37 @@ env:
4242
VERSION_SUFFIX: -beta
4343

4444
jobs:
45+
check-tokens:
46+
name: Check the access tokens used for publishing
47+
runs-on: ubuntu-latest
48+
if: inputs.packagingDebug != true && inputs.skipForumPublish != true
49+
outputs:
50+
publish-forum: ${{ secrets.INTERSECTBOT_FORUM_TOKEN != '' }}
51+
publish-github: ${{ secrets.INTERSECTBOT_ACCESS_TOKEN != '' }}
52+
steps:
53+
- id: dump-token-state
54+
name: Log the state of the tokens
55+
env:
56+
PUBLISH_FORUM: ${{ secrets.INTERSECTBOT_FORUM_TOKEN != '' }}
57+
PUBLISH_GITHUB: ${{ secrets.INTERSECTBOT_ACCESS_TOKEN != '' }}
58+
run: |
59+
echo "PUBLISH_FORUM='$PUBLISH_FORUM'"
60+
echo "PUBLISH_GITHUB='$PUBLISH_GITHUB'"
61+
62+
# debug-check-tokens:
63+
# name: Debug state of check-tokens
64+
# needs: [check-tokens]
65+
# runs-on: ubuntu-latest
66+
# steps:
67+
# - id: dump
68+
# name: Dump check-tokens output
69+
# env:
70+
# PUBLISH_FORUM: ${{ needs.check-tokens.outputs.publish-forum }}
71+
# PUBLISH_GITHUB: ${{ needs.check-tokens.outputs.publish-github }}
72+
# run: |
73+
# echo "PUBLISH_FORUM='$PUBLISH_FORUM'"
74+
# echo "PUBLISH_GITHUB='$PUBLISH_GITHUB'"
75+
4576
generate-keys:
4677
name: Generate Version-Specific Network Keys
4778
runs-on: ubuntu-latest
@@ -326,45 +357,9 @@ jobs:
326357
- name: Debug output
327358
run: ls -laR .
328359

329-
check-tokens:
330-
name: Check the access tokens used for publishing
331-
needs: [build-linux, build-macos, build-windows]
332-
runs-on: ubuntu-latest
333-
if: inputs.workflowDebug != true && inputs.packagingDebug != true && inputs.skipForumPublish != true
334-
outputs:
335-
publish-forum: ${{ steps.check-token-forum.token-set == 'true' }}
336-
publish-github: ${{ steps.check-token-github.token-set == 'true' }}
337-
steps:
338-
- id: check-token-forum
339-
name: Check the token used for publishing releases on the forum
340-
env:
341-
INTERSECTBOT_FORUM_TOKEN: ${{ secrets.INTERSECTBOT_FORUM_TOKEN }}
342-
if: ${{ env.INTERSECTBOT_FORUM_TOKEN != '' }}
343-
run: echo "token-set=true" >> "$GITHUB_OUTPUT"
344-
- id: check-token-github
345-
name: Check the token used for publishing GitHub releases
346-
env:
347-
INTERSECTBOT_ACCESS_TOKEN: ${{ secrets.INTERSECTBOT_ACCESS_TOKEN }}
348-
if: ${{ env.INTERSECTBOT_ACCESS_TOKEN != '' }}
349-
run: echo "token-set=true" >> "$GITHUB_OUTPUT"
350-
351-
debug-check-tokens:
352-
name: Debug state of check-tokens
353-
needs: [check-tokens]
354-
runs-on: ubuntu-latest
355-
steps:
356-
- id: dump
357-
name: Dump check-tokens output
358-
env:
359-
PUBLISH_FORUM: needs.check-tokens.outputs.publish-forum
360-
PUBLISH_GITHUB: needs.check-tokens.outputs.publish-github
361-
run: |
362-
echo "PUBLISH_FORUM='$PUBLISH_FORUM'"
363-
echo "PUBLISH_GITHUB='$PUBLISH_GITHUB'"
364-
365360
publish-github:
366361
name: Publish GitHub Release
367-
needs: [check-tokens]
362+
needs: [build-linux, build-macos, build-windows, check-tokens]
368363
runs-on: ubuntu-latest
369364
if: inputs.workflowDebug != true && needs.check-tokens.outputs.publish-github == 'true'
370365
steps:

0 commit comments

Comments
 (0)