Skip to content

Commit

Permalink
Create SyncToGitee.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
trustedinster authored Jan 14, 2024
1 parent 063af7d commit 78df553
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/SyncToGitee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
push:
pull_request_target:
branches: [master]
name: Tests / test-user-mirror (cached)
jobs:
run:
name: Run
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1

- name: Get Time
id: get-time
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d%H%M%S")"
shell: bash

- name: Cache src repos
uses: actions/cache@v1
id: cache
with:
path: ${{ github.workspace }}/hub-mirror-cache
key: ${{ runner.os }}-hub-repos-cache-${{ steps.get-time.outputs.date }}
restore-keys: ${{ runner.os }}-hub-repos-cache

- name: Mirror Github to Gitee with white list and cache
uses: ./.
with:
src: github/Yikun
dst: gitee/yikunkero
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
dst_token: ${{ secrets.GITEE_TOKEN }}
force_update: true

- name: Print cache path
run: |
ls -la ${{ github.workspace }}/hub-mirror-cache

0 comments on commit 78df553

Please sign in to comment.