Skip to content

Commit

Permalink
fix: cacheing in is-test workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
akijakya committed Apr 1, 2022
1 parent 4c62713 commit 0b60b21
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/is-test-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y-%m")"
shell: bash

- name: Go build cache
uses: actions/cache@v2
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ hashFiles('**/*.go', '**/go.mod', '**/go.sum') }}
key: ${{ runner.os }}-go-build-${{ steps.get-date.outputs.date }}
restore-keys: |
${{ runner.os }}-go-build-
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/is-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y-%m")"
shell: bash

- name: Go build cache
uses: actions/cache@v2
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ hashFiles('**/*.go', '**/go.mod', '**/go.sum') }}
key: ${{ runner.os }}-go-build-${{ steps.get-date.outputs.date }}
restore-keys: |
${{ runner.os }}-go-build-
Expand Down

0 comments on commit 0b60b21

Please sign in to comment.