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

This commit is contained in:
XargonWan 2025-02-03 13:50:21 +09:00
parent ee6d655415
commit 8034f75b72
2 changed files with 2 additions and 11 deletions

View file

@ -21,7 +21,7 @@ jobs:
env:
GIT_NAME: ${{ secrets.GITNAME }}
GIT_MAIL: ${{ secrets.GITMAIL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.UPLOAD_TOKEN }}
# - name: Commit and push changes
# uses: appleboy/git-push-action@v1.0.0

View file

@ -98,16 +98,7 @@ 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 sync --force --branch "$relname"
git push --force "https://${GITHUB_TOKEN}@github.com/${flathub_target_repo}" "$relname"
else
git push --force "https://github.com/${flathub_target_repo}" "$relname"
fi