From 3523fb9425e9f638561d312cd94b0035dfd0415c Mon Sep 17 00:00:00 2001 From: Drew Smirnoff Date: Mon, 9 Mar 2026 16:58:15 +0400 Subject: [PATCH] ci: add GH token for pushing (#252) --- .github/workflows/update-flake.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml index c1800663f9f528eeab7dbd6a74a96aa9a094d888..14902d72e69bdccb071ec83227231dcad5454b5d 100644 --- a/.github/workflows/update-flake.yml +++ b/.github/workflows/update-flake.yml @@ -4,6 +4,7 @@ on: push: branches: [master] paths: [go.sum] + workflow_dispatch: jobs: update: @@ -18,9 +19,18 @@ jobs: - name: Commit changes run: | - git diff --quiet flake.lock && exit 0 + + - name: Configure Git + run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add flake.lock - git commit -m "chore: update flake.lock [skip ci]" - git push + + - name: Push changes + env: + GH_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} + run: | + git diff --quiet flake.lock && exit 0` + git add . + git commit -m "chore: update flake.lock (#228)" + git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git + git push origin HEAD:${GITHUB_REF}