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

This commit is contained in:
XargonWan 2025-02-03 13:54:50 +09:00
parent 8034f75b72
commit d061e32747
2 changed files with 3 additions and 28 deletions

View file

@ -21,17 +21,4 @@ jobs:
env:
GIT_NAME: ${{ secrets.GITNAME }}
GIT_MAIL: ${{ secrets.GITMAIL }}
GITHUB_TOKEN: ${{ secrets.UPLOAD_TOKEN }}
# - name: Commit and push changes
# uses: appleboy/git-push-action@v1.0.0
# with:
# commit_message: "Update RetroDECK to v${{ env.RELNAME }} from RetroDECK/${{ env.RD_BRANCH }}"
# branch: "${{ env.RELNAME }}"
# path: "${{ env.FOLDER_TO_PUSH }}"
# remote: "${{ env.TARGET_REPO }}"
# tag: "v${{ env.RELNAME }} --force"
# force: true
# author_name: ${{ env.GIT_NAME }}
# author_email: ${{ env.GIT_MAIL }}
# commit: true
GITHUB_TOKEN: ${{ secrets.UPLOAD_TOKEN }}

View file

@ -80,13 +80,7 @@ if [ -n "${GITHUB_WORKFLOW}" ]; then
git config --local user.name "$GIT_NAME"
git config --local user.email "$GIT_MAIL"
git config --local credential.helper store
# echo "https://${GIT_NAME}:${GITHUB_TOKEN}@github.com" > ~/.git-credentials
# echo "RD_BRANCH=$rd_branch" >> $GITHUB_ENV
# echo "RELNAME=$relname" >> $GITHUB_ENV
# echo "FOLDER_TO_PUSH=$gits_folder/flathub" >> $GITHUB_ENV
# echo "TARGET_REPO=https://github.com/${flathub_target_repo}" >> $GITHUB_ENV
echo "${GITHUB_TOKEN}" | gh auth login --with-token
elif [[ -z $(git config --get user.name) || -z $(git config --get user.email) ]]; then
read -p "No git user.name set, please enter your name: " git_username
git config --local user.name "$git_username"
@ -96,10 +90,4 @@ fi
git add .
git commit -m "Update RetroDECK to v$relname from RetroDECK/$rd_branch"
if [ -n "${GITHUB_WORKFLOW}" ]; then
git push --force "https://${GITHUB_TOKEN}@github.com/${flathub_target_repo}" "$relname"
else
git push --force "https://github.com/${flathub_target_repo}" "$relname"
fi
git push --force "https://github.com/${flathub_target_repo}" "$relname"