-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: combine and optimized workflows
- Loading branch information
Showing
5 changed files
with
191 additions
and
84 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,18 @@ | ||
name: 'Build' | ||
description: 'Prepares the repo for a job by running the build' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Use cache | ||
id: 'cache' | ||
uses: actions/cache@v3 | ||
with: | ||
path: '**/dist/**' | ||
key: ${{ runner.os }}-build-${{ github.sha }} | ||
|
||
- name: Build | ||
shell: bash | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
npm run build |
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,37 @@ | ||
name: 'Install' | ||
description: 'Prepares the repo for a job by checking out and installing dependencies' | ||
inputs: | ||
node-version: | ||
description: 'The node version to setup' | ||
required: true | ||
registry-url: | ||
description: 'Define registry-url' | ||
required: false | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: echo github.ref | ||
shell: bash | ||
run: echo ${{ github.ref }} | ||
|
||
- name: Use Node.js ${{ inputs.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
registry-url: ${{ inputs.registry-url }} | ||
|
||
- name: Use cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
node_modules | ||
*/*/node_modules | ||
key: ${{ runner.os }}-install-${{ hashFiles('**/package.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-install- | ||
- name: Install | ||
shell: bash | ||
run: | | ||
npm ci |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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