Skip to content

Commit

Permalink
fix: use TOKEN instead of GITHUB_TOKEN (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xWOF authored Jun 25, 2024
2 parents b4dabc9 + f2b2d7a commit d520564
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/gitflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ on:
default: 'changelog.md'
required: false
secrets:
GITHUB_TOKEN:
TOKEN:
description: 'GitHub token (Default: GitHub Action token)'
required: false
GITHUB_APP_ID:
Expand All @@ -75,7 +75,7 @@ env:
VERSION_EXPRESSION: ${{ inputs.VERSION_EXPRESSION || '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*' }}
VERSION_HEADER: ${{ inputs.VERSION_HEADER || '## ' }}
CHANGELOG: ${{ inputs.CHANGELOG || 'changelog.md' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN || github.token }}
TOKEN: ${{ secrets.TOKEN || github.token }}
GITHUB_APP_ID: ${{ secrets.GITHUB_APP_ID }}
GITHUB_APP_PRIVATE_KEY: ${{ secrets.GITHUB_APP_PRIVATE_KEY }}
GITHUB_APP_OWNER: ${{ secrets.GITHUB_APP_OWNER }}
Expand All @@ -101,7 +101,7 @@ jobs:
if: ${{ env.GITHUB_APP_ID && env.GITHUB_APP_PRIVATE_KEY && env.GITHUB_APP_OWNER }}
run: |
echo '::add-mask::${{ steps.fetching-github-token.outputs.token }}'
echo 'GITHUB_TOKEN=${{ steps.fetching-github-token.outputs.token }}' >> $GITHUB_ENV
echo 'TOKEN=${{ steps.fetching-github-token.outputs.token }}' >> $GITHUB_ENV
- name: Check branch
id: check-branch
Expand Down Expand Up @@ -182,12 +182,12 @@ jobs:
pull_number: context.issue.number,
state: 'closed',
})
github-token: ${{ env.GITHUB_TOKEN }}
github-token: ${{ env.TOKEN }}

- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ env.GITHUB_TOKEN }}
token: ${{ env.TOKEN }}

- name: Checkout commit
run: |
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
pull_number: context.issue.number,
state: 'closed',
})
github-token: ${{ env.GITHUB_TOKEN }}
github-token: ${{ env.TOKEN }}

- name: If warn on check feature branch
if: always() && steps.check-feature-branch.outputs.warning != null
Expand All @@ -261,7 +261,7 @@ jobs:
repo: context.repo.repo,
body: message,
})
github-token: ${{ env.GITHUB_TOKEN }}
github-token: ${{ env.TOKEN }}

- name: Check release branch
id: check-release-branch
Expand Down Expand Up @@ -333,7 +333,7 @@ jobs:
pull_number: context.issue.number,
state: 'closed',
})
github-token: ${{ env.GITHUB_TOKEN }}
github-token: ${{ env.TOKEN }}

- name: Finish feature branch
id: finish-feature-branch
Expand Down Expand Up @@ -388,7 +388,7 @@ jobs:
&& git push origin --delete ${{ env.SOURCE_BRANCH }} \
|| :
env:
GH_TOKEN: ${{ env.GITHUB_TOKEN }}
GH_TOKEN: ${{ env.TOKEN }}

- name: Finish norelease branch
id: finish-norelease-branch
Expand Down Expand Up @@ -417,4 +417,4 @@ jobs:
&& git push origin --delete ${{ env.SOURCE_BRANCH }} \
|| :
env:
GH_TOKEN: ${{ env.GITHUB_TOKEN }}
GH_TOKEN: ${{ env.TOKEN }}
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.2.1

- fix: use TOKEN instead of GITHUB_TOKEN

## 2.2.0

- feature: support fetching github token from github app
Expand Down

0 comments on commit d520564

Please sign in to comment.