ci: update git push action for secure authentication

- Replace the old git push action with a new one from a different repository
    - Remove commands for git configuration and committing/pushing code
    - Add new parameters for the git push action, including a commit message and remote repository information
    - Use a secret key for authentication in the git push action

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy 2023-04-28 10:37:08 +08:00
parent ee1a788402
commit bdd1040cf0
1 changed files with 9 additions and 6 deletions

View File

@ -13,9 +13,12 @@ jobs:
- name: update
run: ./bump_version.sh
- name: commit
run: |
git config --global user.email "teabot@gitea.io"
git config --global user.name "GiteaBot"
git add --all
git commit -m "[skip ci] Updated Version via cron" || true
git push origin main
uses: https://github.com/appleboy/git-push-action@v0.0.2
with:
author_email: "teabot@gitea.io"
author_name: GiteaBot
branch: main
commit: true
commit_message: "[skip ci] Updated Version via cron"
remote: "git@gitea.com:gitea/act_runner.git"
ssh_key: ${{ secrets.DEPLOY_KEY }}