This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from cultureamp/heartsquared/fix-canary
ci: add setup action for canary
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# this is composite workflow that gets the repo ready for actions | ||
# for docs how composite workflows work see https://wallis.dev/blog/composite-github-actions | ||
|
||
name: Setup repository | ||
description: Sets this repository up to allow efficient run of various github actions | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
# setup node | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: "yarn" | ||
registry-url: https://npm.pkg.github.com/ | ||
|
||
# yarn install with use of cache | ||
# this is bit duplicate to cache: "yarn" above, but from testing the best performance is when both are used. | ||
- name: Cache node modules | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: ./node_modules | ||
key: kaizen-${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('./yarn.lock') }} | ||
- name: yarn install | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
npm config set "//npm.pkg.github.com/:_authToken" "$GITHUB_TOKEN" | ||
yarn install --frozen-lockfile | ||
# setup turborepo cache | ||
- uses: dtinth/setup-github-actions-caching-for-turbo@v1 |