1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 15:32:50 -05:00

ci: switch to gh pat

This commit is contained in:
bbedward
2025-11-30 01:20:19 -05:00
parent 1b4363a54a
commit 7f6a71b964
2 changed files with 13 additions and 31 deletions

View File

@@ -63,28 +63,16 @@ jobs:
echo "vendorHash updated successfully!"
- name: Commit and push vendorHash update
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
set -euo pipefail
if ! git diff --quiet flake.nix; then
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "dms-ci"
git config user.email "dms-ci@users.noreply.github.com"
git add flake.nix
git commit -m "nix: update vendorHash for go.mod changes"
for attempt in 1 2 3; do
if git push; then
echo "Successfully pushed vendorHash update"
exit 0
fi
echo "Push attempt $attempt failed, pulling and retrying..."
git pull --rebase
sleep $((attempt*2))
done
echo "Failed to push after retries" >&2
exit 1
git commit -m "nix: update vendorHash for go.mod changes" || exit 0
git push https://x-access-token:${GH_PAT}@github.com/${{ github.repository }}.git HEAD:master
else
echo "No changes to flake.nix"
fi