Skip to content

Commit 4c724cf

Browse files
authored
use bot app auth rather than personal access token (#221)
1 parent d150e78 commit 4c724cf

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@ jobs:
1717
run: |
1818
sudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v1.3.0/bazelisk-linux-amd64
1919
sudo chmod +x /usr/local/bin/bazel
20+
# this is tibdex/github-app-token v1.5.1, pinned to the commit SHA for security
21+
- uses: tibdex/github-app-token@7ce9ffdcdeb2ba82b01b51d6584a6a85872336d4
22+
id: generate-token
23+
with:
24+
app_id: ${{ secrets.AUTH_FOR_GITHUB_APP_ID }}
25+
private_key: ${{ secrets.AUTH_FOR_GITHUB_PRIVATE_KEY }}
2026
- name: Check out code into the Go module directory
2127
uses: actions/checkout@v2
2228
with:
23-
token: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
29+
token: ${{ steps.generate-token.outputs.token }}
2430
ref: ${{ github.head_ref }}
2531
- name: Sync Dependencies
2632
run: bazel run //:vendor
@@ -29,9 +35,10 @@ jobs:
2935
uses: stefanzweifel/git-auto-commit-action@v4.12.0
3036
with:
3137
commit_message: Apply syncdeps changes
38+
commit_user_name: kindlymachine[bot]
3239
branch: ${{ github.head_ref }}
3340
env:
34-
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
41+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
3542
if: (github.actor == 'dependabot-preview[bot]') || (github.actor == 'renovate[bot]')
3643
- name: bazel build
3744
run: bazel run :install
@@ -44,7 +51,7 @@ jobs:
4451
- name: dry run goreleaser
4552
uses: goreleaser/goreleaser-action@master
4653
env:
47-
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
54+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
4855
with:
4956
version: latest
5057
args: release --snapshot --skip-publish

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ scoop:
7373
# Git author used to commit to the repository.
7474
# Defaults are shown.
7575
commit_author:
76-
name: support-kindlyops
76+
name: kindlymachine[bot]
7777
email: support@kindlyops.com
7878

7979
# Your app's homepage.

0 commit comments

Comments
 (0)