Skip to content

Commit 97109d0

Browse files
committed
fix(actions): use GH_TOKEN env for composite actions
1 parent 64a788d commit 97109d0

File tree

5 files changed

+6
-14
lines changed

5 files changed

+6
-14
lines changed

.github/changeset-preview/action.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
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
73
runs:
84
using: composite
95
steps:
@@ -21,5 +17,3 @@ runs:
2117
--pr "${{ github.event.number }}" \
2218
--body-file /tmp/changeset-preview.md \
2319
--marker "<!-- changeset-version-preview -->"
24-
env:
25-
GH_TOKEN: ${{ inputs.token }}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ 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 }}
59+
env:
60+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
6061
```
6162
6263
## Requirements

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ 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
107
runs:
118
using: composite
129
steps:
@@ -15,4 +12,3 @@ runs:
1512
run: node ${{ github.action_path }}/comment-on-release.ts
1613
env:
1714
PUBLISHED_PACKAGES: ${{ inputs.published-packages }}
18-
GH_TOKEN: ${{ inputs.token }}

.github/workflows/pr.yml

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

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ jobs:
4545
uses: ./.github/comment-on-release
4646
with:
4747
published-packages: ${{ steps.changesets.outputs.publishedPackages }}
48-
token: ${{ secrets.GH_TOKEN }}
48+
env:
49+
GH_TOKEN: ${{ secrets.GH_TOKEN }}

0 commit comments

Comments
 (0)