Skip to content

Commit 6dfe6b4

Browse files
committed
fix(ci): add fallback for GITHUB_PAT_TOKEN_NSHEAPS
Use github.token as fallback when PAT secret isn't available
1 parent 5096abc commit 6dfe6b4

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/cd.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ jobs:
5050
uses: actions/checkout@v4
5151
with:
5252
fetch-depth: 0
53-
token: ${{ secrets.GITHUB_PAT_TOKEN_NSHEAPS }}
53+
# Use PAT for pushing, fallback to github.token
54+
token: ${{ secrets.GITHUB_PAT_TOKEN_NSHEAPS || github.token }}
5455

5556
- name: Install mise
5657
run: |

.github/workflows/ci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222
uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0
25-
token: ${{ secrets.GITHUB_PAT_TOKEN_NSHEAPS }}
25+
# Use PAT for pushing back to branch, fallback to github.token for PRs from forks
26+
token: ${{ secrets.GITHUB_PAT_TOKEN_NSHEAPS || github.token }}
2627

2728
- name: Install mise
2829
run: |

0 commit comments

Comments
 (0)