Skip to content

Commit b6282e3

Browse files
committed
Use token in checkout step
1 parent 97f390f commit b6282e3

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

.github/workflows/version.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,7 @@ jobs:
2020
- name: Checkout
2121
uses: actions/checkout@v3
2222
with:
23-
persist-credentials: false
24-
- name: Setup Git config
25-
env:
26-
GH_USER: ${{ secrets.GH_USER }}
27-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
28-
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
29-
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
30-
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
31-
run: |
32-
git remote set-url --push origin "https://${GH_USER}:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
33-
git config user.name "$GIT_USER_NAME"
34-
git config user.email "$GIT_USER_EMAIL"
23+
token: ${{ secrets.GH_TOKEN }}
3524
- name: Import GPG key
3625
uses: crazy-max/ghaction-import-gpg@v5
3726
with:

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ The version and format GitHub actions
198198
require a user with write access to the repository.
199199
Set these additional secrets to enable the action:
200200

201-
- `GH_USER`: The GitHub user's username.
202201
- `GH_TOKEN`: A personal access token for the user.
203202
- `GIT_USER_NAME`: The GitHub user's real name.
204203
- `GIT_USER_EMAIL`: The GitHub user's email.

0 commit comments

Comments
 (0)