ci: this should update every branch, even future ones

This commit is contained in:
silver 2025-05-08 15:28:03 +01:00
parent e5ed381c64
commit c73e874fc4
Signed by: silver
GPG key ID: 36F93D61BAD3FD7D

View file

@ -24,22 +24,19 @@ jobs:
- name: Update each branch
shell: bash
run: |
git fetch --all
git pull --all
branches=()
eval "$(git for-each-ref --shell --format='branches+=(%(refname))' refs/remotes/origin/)"
for branch in "${branches[@]}"; do
# need to convert "refs/heads/main" to "main"
# need to convert "'refs/remotes/origin/main" to "main"
branch_local=$(echo "$branch" | awk -F'[\\\\/]' ' { print $4 }')
echo $branch_local
#git switch $branch_local
#git status
#nix run .#update_plugin -- update geyser
git switch $branch_local
git status
nix run .#update_plugin -- update geyser
## these will only succeed if there are changes
#git add --all
#git commit -m "Updated geyser for $branch_local"
#git push
git add --all
git commit -m "Updated geyser for $branch_local"
git push
done
# - uses: https://github.com/stefanzweifel/git-auto-commit-action@v5
# with: