-
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.
Change the get time script to the same version with actions/cache example [1] https://github.com/actions/cache
- Loading branch information
Showing
1 changed file
with
7 additions
and
9 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 |
---|---|---|
|
@@ -8,21 +8,19 @@ jobs: | |
- name: Checkout source code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Get time | ||
id: info | ||
uses: actions/[email protected] | ||
with: | ||
result-encoding: string | ||
script: | | ||
return new Date(Date.now()).toISOString().replace(/[^0-9]/g, ""); | ||
- 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 }}-yikun-hub-cache-${{ steps.info.outputs.result }} | ||
restore-keys: ${{ runner.os }}-yikun-hub-cache | ||
key: ${{ runner.os }}-repos-cache-${{ steps.get-time.outputs.date }} | ||
restore-keys: ${{ runner.os }}-repos-cache | ||
|
||
- name: Mirror Github to Gitee with white list and cache | ||
uses: ./. | ||
|