mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-04-10 19:15:12 +00:00
WORKFLOW: added proper push step if in gtihub runner [skip ci]
This commit is contained in:
parent
c6becfef52
commit
2e74c16c01
11
.github/workflows/flathub_push_main.yml
vendored
11
.github/workflows/flathub_push_main.yml
vendored
|
@ -21,4 +21,13 @@ jobs:
|
|||
env:
|
||||
GIT_NAME: ${{ secrets.GITNAME }}
|
||||
GIT_MAIL: ${{ secrets.GITMAIL }}
|
||||
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Commit and push changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: "Updated flathub/net.retrodeck.retrodeck to v${{ env.RELNAME }} from RetroDECK/${{ env.RD_BRANCH }}"
|
||||
branch: "${{ env.RD_BRANCH }}"
|
||||
repository: "${{ secrets.GITHUB_REPOSITORY }}"
|
||||
commit_user_name: ${{ secrets.GITNAME }}
|
||||
commit_user_email: ${{ secrets.GITMAIL }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
@ -80,9 +80,10 @@ elif [[ -z $(git config --get user.name) || -z $(git config --get user.email) ]]
|
|||
fi
|
||||
|
||||
if [ -n "${GITHUB_WORKFLOW}" ]; then
|
||||
secret="$GIT_TOKEN@"
|
||||
fi
|
||||
|
||||
git add *
|
||||
echo "RD_BRANCH=$rd_branch" >> $GITHUB_ENV
|
||||
echo "RELNAME=$relname" >> $GITHUB_ENV
|
||||
else
|
||||
git add .
|
||||
git commit -m "Updated flathub/net.retrodeck.retrodeck to v$relname from RetroDECK/$rd_branch"
|
||||
git push --force "https://${secret}github.com/${flathub_target_repo}.git" "$relname"
|
||||
git push --force "https://github.com/${flathub_target_repo}.git" "$relname"
|
||||
fi
|
Loading…
Reference in a new issue