mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-04-10 19:15:12 +00:00
WORKFLOW: trying again without the push job [skip ci]
This commit is contained in:
parent
166b43485b
commit
55b629fce2
24
.github/workflows/flathub_push_main.yml
vendored
24
.github/workflows/flathub_push_main.yml
vendored
|
@ -21,15 +21,17 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GIT_NAME: ${{ secrets.GITNAME }}
|
GIT_NAME: ${{ secrets.GITNAME }}
|
||||||
GIT_MAIL: ${{ secrets.GITMAIL }}
|
GIT_MAIL: ${{ secrets.GITMAIL }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Commit and push changes
|
# - name: Commit and push changes
|
||||||
uses: appleboy/git-push-action@v1.0.0
|
# uses: appleboy/git-push-action@v1.0.0
|
||||||
with:
|
# with:
|
||||||
commit_message: "Update RetroDECK to v${{ env.RELNAME }} from RetroDECK/${{ env.RD_BRANCH }}"
|
# commit_message: "Update RetroDECK to v${{ env.RELNAME }} from RetroDECK/${{ env.RD_BRANCH }}"
|
||||||
branch: "${{ env.RELNAME }}"
|
# branch: "${{ env.RELNAME }}"
|
||||||
path: "${{ env.FOLDER_TO_PUSH }}"
|
# path: "${{ env.FOLDER_TO_PUSH }}"
|
||||||
remote: "${{ env.TARGET_REPO }}"
|
# remote: "${{ env.TARGET_REPO }}"
|
||||||
tag: "v${{ env.RELNAME }} --force"
|
# tag: "v${{ env.RELNAME }} --force"
|
||||||
force: true
|
# force: true
|
||||||
author_name: ${{ env.GIT_NAME }}
|
# author_name: ${{ env.GIT_NAME }}
|
||||||
author_email: ${{ env.GIT_MAIL }}
|
# author_email: ${{ env.GIT_MAIL }}
|
||||||
|
# commit: true
|
|
@ -75,11 +75,20 @@ cat << EOF >> flathub.json
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# If we are in a GitHub workflow...
|
||||||
if [ -n "${GITHUB_WORKFLOW}" ]; then
|
if [ -n "${GITHUB_WORKFLOW}" ]; then
|
||||||
git config --local user.name "$GIT_NAME"
|
git config --local user.name "$GIT_NAME"
|
||||||
git config --local user.email "$GIT_MAIL"
|
git config --local user.email "$GIT_MAIL"
|
||||||
git config --local credential.helper store
|
git config --local credential.helper store
|
||||||
echo "https://${GIT_NAME}:${GITHUB_TOKEN}@github.com" > ~/.git-credentials
|
|
||||||
|
GITHUB_TOKEN="${GITHUB_TOKEN}@" #we add this in order to inject the @ to correctly populate tue git url
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
elif [[ -z $(git config --get user.name) || -z $(git config --get user.email) ]]; then
|
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
|
read -p "No git user.name set, please enter your name: " git_username
|
||||||
git config --local user.name "$git_username"
|
git config --local user.name "$git_username"
|
||||||
|
@ -87,13 +96,7 @@ elif [[ -z $(git config --get user.name) || -z $(git config --get user.email) ]]
|
||||||
git config --local user.email "$git_email"
|
git config --local user.email "$git_email"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${GITHUB_WORKFLOW}" ]; then
|
|
||||||
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
|
|
||||||
else
|
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Update RetroDECK to v$relname from RetroDECK/$rd_branch"
|
git commit -m "Update RetroDECK to v$relname from RetroDECK/$rd_branch"
|
||||||
git push --force "https://github.com/${flathub_target_repo}" "$relname"
|
git push --force "https://{$GITHUB_TOKEN}github.com/${flathub_target_repo}" "$relname"
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in a new issue