FIX CI setup for flake auto update

This commit is contained in:
Lan Tian 2025-12-09 20:11:12 -08:00
parent 009f10657e
commit 88051166ad
No known key found for this signature in database
GPG Key ID: 04E66B6B25A0862B

View File

@ -39,7 +39,7 @@ jobs:
extra_nix_config: | extra_nix_config: |
experimental-features = nix-command flakes ca-derivations experimental-features = nix-command flakes ca-derivations
extra-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 extra-platforms = i686-linux aarch64-linux arm-linux
log-lines = 25 log-lines = 25
@ -67,17 +67,9 @@ jobs:
chmod +x zfs-cachyos/update.py chmod +x zfs-cachyos/update.py
zfs-cachyos/update.py zfs-cachyos/update.py
- env: - name: Commit back to repository
API_TOKEN_GITHUB: ${{ secrets.AUTOMERGE_TOKEN }} uses: stefanzweifel/git-auto-commit-action@v7
run: | with:
# https://github.com/cpina/github-action-push-to-another-repository/issues/75 commit_message: 'Auto update flake'
git config --unset-all http.https://github.com/.extraheader || true commit_user_name: 'xddxdd-bot'
git config --global user.email "xddxdd-bot@users.noreply.github.com" commit_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