.github: try hard-resetting too just incase

This commit is contained in:
ckie
2022-05-05 11:30:08 +03:00
parent 6860a32b4b
commit 971616be1e

View File

@ -5,8 +5,9 @@ echo "$GITHUB_API_TOKEN" | gh auth login --with-token
git branch -D depupdate || true git branch -D depupdate || true
git branch depupdate git branch depupdate
git checkout depupdate git checkout depupdate
git reset --hard origin/master
json="$(gh pr list --search "author:app/github-actions" --json headRefName,number)" json="$(gh pr list --search "author:app/github-actions" --json headRefName,number)"
echo "$json" | jq '.[] | .headRefName | @text' | xargs -L1 -- git pull --rebase origin echo "$json" | jq '.[] | .headRefName | @text' | xargs -L1 -- git pull origin
if nix flake check; then if nix flake check; then
echo "$json" | jq ".[] | .number | @text" | xargs -L1 -- gh pr merge --squash --delete-branch echo "$json" | jq ".[] | .number | @text" | xargs -L1 -- gh pr merge --squash --delete-branch
else else