Update auto go mod tidy workflow to remove user association (#3517)
This PR updates go.tidy.yml, and use pseudo name `coredns-auto-go-mod-tidy[bot]`, so that the commit is not associated with real user. Otherwise the commit history could be confusing. This is similar to what `dependabot[bot]` is doing for commits generated by bots. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
parent
a2481250e0
commit
6cf1c086ac
1 changed files with 4 additions and 4 deletions
8
.github/workflows/go.tidy.yml
vendored
8
.github/workflows/go.tidy.yml
vendored
|
@ -5,9 +5,9 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
paths:
|
paths:
|
||||||
|
- '.github/workflows/go.tidy.yml'
|
||||||
- 'go.mod'
|
- 'go.mod'
|
||||||
- 'go.sum'
|
- 'go.sum'
|
||||||
- '.github/workflows/go.tidy.yml'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fix:
|
fix:
|
||||||
|
@ -30,14 +30,14 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
git config user.name "${GITHUB_ACTOR}"
|
git config user.name "coredns-auto-go-mod-tidy[bot]"
|
||||||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
git config user.email "coredns-auto-go-mod-tidy[bot]@users.noreply.github.com"
|
||||||
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
|
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
|
||||||
-
|
-
|
||||||
name: Commit and push changes
|
name: Commit and push changes
|
||||||
run: |
|
run: |
|
||||||
git add .
|
git add .
|
||||||
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
|
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
|
||||||
git commit -m 'auto go tidy'
|
git commit -m 'auto go mod tidy'
|
||||||
git push
|
git push
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue