-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a `cache_path` feature to allow user set the secific cache_path to cache the git repo. And user can use it to set the cache path, coordinate with [action/cache](https://github.com/actions/cache) to speed up the mirror. Closes: #13
- Loading branch information
Showing
5 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
on: push | ||
name: Hub Action test for org account | ||
name: org-account-test | ||
jobs: | ||
run: | ||
name: Run | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
on: push | ||
name: user-account-cache-test | ||
jobs: | ||
run: | ||
name: Run | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source codes | ||
uses: actions/checkout@v1 | ||
|
||
- name: Cache src repos | ||
uses: actions/cache@v1 | ||
id: cache | ||
with: | ||
path: ~/.hub-mirror-action | ||
key: ${{ runner.os }}-yikun | ||
restore-keys: | | ||
${{ runner.os }}-yikun | ||
- name: Print the cache status | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
run: echo "Cached successfully." | ||
|
||
- name: Mirror Github to Gitee | ||
uses: ./. | ||
with: | ||
src: github/Yikun | ||
dst: gitee/yikunkero | ||
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} | ||
dst_token: ${{ secrets.GITEE_TOKEN }} | ||
cache_path: /.hub-mirror-action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
on: push | ||
name: Hub Action test for user account | ||
name: user-account-test | ||
jobs: | ||
run: | ||
name: Run | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters