Skip to content

Commit 64a788d

Browse files
committed
fix(actions): pass GH_TOKEN into composite actions
1 parent fda8648 commit 64a788d

File tree

5 files changed

+15
-2
lines changed

5 files changed

+15
-2
lines changed

.github/changeset-preview/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Changeset Preview
22
description: Generates comment on a PR showing expected version impact
3+
inputs:
4+
token:
5+
description: GitHub token used to post the preview comment
6+
required: true
37
runs:
48
using: composite
59
steps:
@@ -18,4 +22,4 @@ runs:
1822
--body-file /tmp/changeset-preview.md \
1923
--marker "<!-- changeset-version-preview -->"
2024
env:
21-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
25+
GH_TOKEN: ${{ inputs.token }}

.github/comment-on-release/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Add this step to your `.github/workflows/release.yml` file after the `changesets
5656
uses: TanStack/config/.github/comment-on-release@main
5757
with:
5858
published-packages: ${{ steps.changesets.outputs.publishedPackages }}
59+
token: ${{ secrets.GH_TOKEN }}
5960
```
6061
6162
## Requirements

.github/comment-on-release/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
published-packages:
55
description: 'JSON string of published packages from changesets/action'
66
required: true
7+
token:
8+
description: GitHub token used to comment on PRs and issues
9+
required: true
710
runs:
811
using: composite
912
steps:
@@ -12,4 +15,4 @@ runs:
1215
run: node ${{ github.action_path }}/comment-on-release.ts
1316
env:
1417
PUBLISHED_PACKAGES: ${{ inputs.published-packages }}
15-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
18+
GH_TOKEN: ${{ inputs.token }}

.github/workflows/pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,5 @@ jobs:
6363
uses: ./.github/setup
6464
- name: Changeset Preview
6565
uses: ./.github/changeset-preview
66+
with:
67+
token: ${{ secrets.GH_TOKEN }}

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ jobs:
3838
publish: pnpm run changeset:publish
3939
commit: 'ci: Version Packages'
4040
title: 'ci: Version Packages'
41+
env:
42+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
4143
- name: Comment on PRs and issues about release
4244
if: steps.changesets.outputs.published == 'true'
4345
uses: ./.github/comment-on-release
4446
with:
4547
published-packages: ${{ steps.changesets.outputs.publishedPackages }}
48+
token: ${{ secrets.GH_TOKEN }}

0 commit comments

Comments
 (0)