diff --git a/.github/workflows/flathub_push_main.yml b/.github/workflows/flathub_push_main.yml index b1e3bf9c..562bb0a1 100644 --- a/.github/workflows/flathub_push_main.yml +++ b/.github/workflows/flathub_push_main.yml @@ -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 diff --git a/automation_tools/flathub_push_main.sh b/automation_tools/flathub_push_main.sh index 7d914a33..ff25a5f2 100755 --- a/automation_tools/flathub_push_main.sh +++ b/automation_tools/flathub_push_main.sh @@ -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