Skip to content

Commit

Permalink
perf(ci): add docker caching
Browse files Browse the repository at this point in the history
  • Loading branch information
cjtim committed Jun 4, 2022
1 parent b0aa407 commit 30a9c43
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ jobs:
with:
node-version: '14'

- name: Restore NPM cache
uses: actions/cache@v2
with:
path: |
node_modules
~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-14-x-${{ github.ref }}
- name: Yarn install
run: yarn install --frozen-lockfile

Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: satackey/[email protected]
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
with:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-14-x-${{ github.ref }}
- name: Build container image
uses: docker/build-push-action@v3
with:
Expand Down Expand Up @@ -64,7 +72,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
ref: ${{ env.PAGES_BRANCH }}
path: ${{ env.PAGES_BRANCH }}
Expand All @@ -88,7 +95,6 @@ jobs:
cd ${{ env.PAGES_BRANCH }}
git config --local user.name "${{ github.repository_owner }}"
git config --local user.email "[email protected]"
git remote set-url origin https://${{ github.repository_owner }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git add -A
git commit -m "Update helm chart ${GITHUB_REF_NAME}"
git push -u origin ${{ env.PAGES_BRANCH }}

0 comments on commit 30a9c43

Please sign in to comment.