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
|
- name: Update each branch
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
git fetch --all
|
|
||||||
git pull --all
|
|
||||||
branches=()
|
branches=()
|
||||||
eval "$(git for-each-ref --shell --format='branches+=(%(refname))' refs/remotes/origin/)"
|
eval "$(git for-each-ref --shell --format='branches+=(%(refname))' refs/remotes/origin/)"
|
||||||
for branch in "${branches[@]}"; do
|
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 }')
|
branch_local=$(echo "$branch" | awk -F'[\\\\/]' ' { print $4 }')
|
||||||
echo $branch_local
|
git switch $branch_local
|
||||||
#git switch $branch_local
|
git status
|
||||||
#git status
|
nix run .#update_plugin -- update geyser
|
||||||
#nix run .#update_plugin -- update geyser
|
|
||||||
|
|
||||||
## these will only succeed if there are changes
|
## these will only succeed if there are changes
|
||||||
#git add --all
|
git add --all
|
||||||
#git commit -m "Updated geyser for $branch_local"
|
git commit -m "Updated geyser for $branch_local"
|
||||||
#git push
|
git push
|
||||||
done
|
done
|
||||||
# - uses: https://github.com/stefanzweifel/git-auto-commit-action@v5
|
# - uses: https://github.com/stefanzweifel/git-auto-commit-action@v5
|
||||||
# with:
|
# with:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue