Skip to content

Commit 3523fb9

Browse files
authored
ci: add GH token for pushing (#252)
1 parent 6f7b3b5 commit 3523fb9

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/update-flake.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches: [master]
66
paths: [go.sum]
7+
workflow_dispatch:
78

89
jobs:
910
update:
@@ -18,9 +19,18 @@ jobs:
1819

1920
- name: Commit changes
2021
run: |
21-
git diff --quiet flake.lock && exit 0
22+
23+
- name: Configure Git
24+
run: |
2225
git config user.name "github-actions[bot]"
2326
git config user.email "github-actions[bot]@users.noreply.github.com"
24-
git add flake.lock
25-
git commit -m "chore: update flake.lock [skip ci]"
26-
git push
27+
28+
- name: Push changes
29+
env:
30+
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
31+
run: |
32+
git diff --quiet flake.lock && exit 0`
33+
git add .
34+
git commit -m "chore: update flake.lock (#228)"
35+
git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git
36+
git push origin HEAD:${GITHUB_REF}

0 commit comments

Comments
 (0)