From 88051166adeb137832e576daad11882ec027d17f Mon Sep 17 00:00:00 2001 From: Lan Tian Date: Tue, 9 Dec 2025 20:11:12 -0800 Subject: [PATCH] FIX CI setup for flake auto update --- .github/workflows/auto-update.yml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 1a9500f..69d6f1a 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -39,7 +39,7 @@ jobs: extra_nix_config: | experimental-features = nix-command flakes ca-derivations extra-experimental-features = nix-command flakes ca-derivations - access-tokens = github.com=${{ secrets.AUTOMERGE_TOKEN }} + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} extra-platforms = i686-linux aarch64-linux arm-linux log-lines = 25 @@ -67,17 +67,9 @@ jobs: chmod +x zfs-cachyos/update.py zfs-cachyos/update.py - - env: - API_TOKEN_GITHUB: ${{ secrets.AUTOMERGE_TOKEN }} - run: | - # https://github.com/cpina/github-action-push-to-another-repository/issues/75 - git config --unset-all http.https://github.com/.extraheader || true - git config --global user.email "xddxdd-bot@users.noreply.github.com" - git config --global user.name "xddxdd-bot" - - git add . - if git commit -m "auto: update packages" ; then - git remote remove origin - git remote add origin "https://xddxdd-bot:$API_TOKEN_GITHUB@github.com/xddxdd/nix-cachyos-kernel.git" - git push -u origin master - fi + - name: Commit back to repository + uses: stefanzweifel/git-auto-commit-action@v7 + with: + commit_message: 'Auto update flake' + commit_user_name: 'xddxdd-bot' + commit_user_email: 'xddxdd-bot@users.noreply.github.com'