Skip to content

Commit

Permalink
Create sync-to-gitee.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
PerryZhao authored Feb 19, 2024
1 parent 452f26a commit b7d147e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/sync-to-gitee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Sync to Gitee
run-name: "[${{ github.workflow }}] - ${{ github.event.head_commit.message }}"

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow}}
cancel-in-progress: true

env:
GITEE_REPOSITORY: zaonline/devpilot-intellij
jobs:
sync_to_gitee:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
remote_repo="https://${{ secrets.GITEE_USERNAME }}:${{ secrets.GITEE_PAT }}@gitee.com/${{ env.GITEE_REPOSITORY }}.git"
git remote add gitee "${remote_repo}"
branch=$(git branch --show-current)
git push gitee $branch -f

0 comments on commit b7d147e

Please sign in to comment.