mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-04-10 19:15:12 +00:00
WORKFLOW: trying using gh instead - fix3 [skip ci]
This commit is contained in:
parent
ee6d655415
commit
8034f75b72
2
.github/workflows/flathub_push_main.yml
vendored
2
.github/workflows/flathub_push_main.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue