WORKFLOW: trying using gh instead - fix2 [skip ci]

This commit is contained in:
XargonWan 2025-02-03 13:46:04 +09:00
parent 1da159708a
commit ee6d655415

View file

@ -98,9 +98,15 @@ git add .
git commit -m "Update RetroDECK to v$relname from RetroDECK/$rd_branch"
if [ -n "${GITHUB_WORKFLOW}" ]; then
if ! git ls-remote --exit-code --heads origin "$relname"; then
echo "Branch $relname not found. Creating..."
git checkout -b "$relname"
git push -u origin "$relname"
fi
gh auth login --with-token <<< "${GITHUB_TOKEN}"
gh repo set-default "${flathub_target_repo}"
gh repo create-branch --branch "$relname"
gh repo sync --force --branch "$relname"
else
git push --force "https://github.com/${flathub_target_repo}" "$relname"