Skip to content

Commit

Permalink
fix: move app checkout step to the front and use token for checkout
Browse files Browse the repository at this point in the history
The changesets/action does not actually use the GITHUB_TOKEN for git operations, so we need to use the app token for the checkout step which sets up the git config.

See: changesets/action#187 (comment)

Signed-off-by: Lachlan Heywood <[email protected]>
  • Loading branch information
lachieh committed Jan 14, 2025
1 parent 77c43ac commit 122b470
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/ci_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Setup Node, Yarn, and Turbo
uses: ./.github/actions/ts-setup
with:
npm-token: ${{ secrets.NPM_TOKEN }}

- name: Build
run: yarn build

- name: Get App Token
id: app-token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
Expand All @@ -62,6 +51,19 @@ jobs:
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
git config --global format.signOff true
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
token: ${{ steps.app-token.outputs.token }}

- name: Setup Node, Yarn, and Turbo
uses: ./.github/actions/ts-setup
with:
npm-token: ${{ secrets.NPM_TOKEN }}

- name: Build
run: yarn build

- name: Version or Publish
id: changesets
uses: changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308
Expand Down Expand Up @@ -100,4 +102,3 @@ jobs:
uses: ./.github/workflows/release_washboard-ui.yml
with:
version: ${{ fromJson(needs.changesets.outputs.packageVersions).washboard-ui }}

0 comments on commit 122b470

Please sign in to comment.