ci: this should update every branch, even future ones
This commit is contained in:
parent
e5ed381c64
commit
c73e874fc4
1 changed files with 7 additions and 10 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue