Skip to content

Commit 49801c9

Browse files
authored
Never trigger antora builds for PRs from forks (#686)
Since no secrets will be available for security reasons, do not try to trigger antora builds when those secrets are not available. Signed-off-by: Pierre R. Mai <pmai@pmsf.de>
1 parent 225d614 commit 49801c9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/antora-generator.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@ jobs:
1313

1414
runs-on: Ubuntu-latest
1515

16+
env:
17+
MUP_KEY: ${{ secrets.MACHINE_USER_PAT }}
18+
1619
steps:
1720
- name: Trigger generator
21+
if: ${{ env.MUP_KEY != '' }}
1822
uses: peter-evans/repository-dispatch@v2
1923
with:
2024
token: ${{ secrets.MACHINE_USER_PAT }}
2125
event-type: antora-build-trigger
2226
repository: OpenSimulationInterface/osi-antora-generator
2327
client-payload: '{"src": "${{ github.repository }}", "ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "head_ref": "${{ github.head_ref }}"}'
24-

0 commit comments

Comments
 (0)