fix(ci): robustly skip app token generation for fork PRs

This commit is contained in:
Bryan Morgan
2026-03-03 00:21:51 -05:00
parent af7390b604
commit 74e1e563ce
3 changed files with 3 additions and 42 deletions

View File

@@ -23,10 +23,7 @@ jobs:
steps:
- name: 'Generate GitHub App Token'
id: 'generate_token'
env:
APP_ID: '${{ secrets.APP_ID }}'
if: |-
${{ env.APP_ID != '' }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: 'actions/create-github-app-token@v2'
with:
app-id: '${{ secrets.APP_ID }}'

View File

@@ -1,13 +0,0 @@
name: Test Secrets If
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check Secret
if: ${{ secrets.APP_ID != '' }}
run: echo "Secret is not empty"
- name: Check Secret 2
if: secrets.APP_ID != ''
run: echo "Secret is not empty 2"