Skip to content

Commit 6ce1e1f

Browse files
authored
fix: skip forum publish if INTERSECTBOT_ACCESS_TOKEN not set (AscensionGameDev#2114)
* Skip forum publish if token not set * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml
1 parent ef230ea commit 6ce1e1f

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,26 @@ jobs:
384384
prerelease: true
385385
tag: v${{ env.VERSION_PREFIX }}${{ env.VERSION_SUFFIX }}.${{ github.run_number }}
386386

387-
publish-forum:
388-
name: Publish to Forum
387+
check-publish-forum:
388+
name: Check if token set to publish to forum
389389
if: inputs.workflowDebug != true && inputs.packagingDebug != true && inputs.skipForumPublish != true
390390
needs: publish-github
391391
runs-on: ubuntu-latest
392+
outputs:
393+
skip: ${{ steps.check-INTERSECTBOT_ACCESS_TOKEN.outputs.skip == 'true' }}
394+
steps:
395+
- id: check-INTERSECTBOT_ACCESS_TOKEN
396+
name: Check INTERSECTBOT_ACCESS_TOKEN
397+
env:
398+
INTERSECTBOT_ACCESS_TOKEN: ${{ secrets.INTERSECTBOT_ACCESS_TOKEN }}
399+
if: ${{ env.INTERSECTBOT_ACCESS_TOKEN == '' }}
400+
run: echo "skip=true" >> "$GITHUB_OUTPUT"
401+
402+
publish-forum:
403+
name: Publish to Forum
404+
if: inputs.workflowDebug != true && inputs.packagingDebug != true && inputs.skipForumPublish != true && needs.check-publish-forum.outputs.skip != 'true'
405+
needs: check-publish-forum
406+
runs-on: ubuntu-latest
392407
steps:
393408
- name: Publish to Forum
394409
uses: AscensionGameDev/actions@0223df40becb110039c705c02cfd2cd8f274199c

0 commit comments

Comments
 (0)