-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(actions): testing composite actions
- Loading branch information
1 parent
6dcd954
commit d64552d
Showing
3 changed files
with
59 additions
and
49 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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
name: '[Workflow] Checkout' | ||
author: miguelramos | ||
branding: | ||
color: 'purple' | ||
icon: 'octagon' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
depth: | ||
description: 'Depth' | ||
default: 0 | ||
type: number | ||
inputs: | ||
depth: | ||
description: 'Depth' | ||
default: 0 | ||
type: number | ||
|
||
jobs: | ||
checkout-repo: | ||
name: Checkout Repository | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: ${{ github.event.inputs.depth }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: ${{ github.event.inputs.depth }} |
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
name: '[Workflow] NodeJs' | ||
author: miguelramos | ||
branding: | ||
color: 'green' | ||
icon: 'moon' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: 'Node version' | ||
default: '20' | ||
type: string | ||
inputs: | ||
version: | ||
description: 'Node version' | ||
default: '20' | ||
type: string | ||
|
||
jobs: | ||
install-node: | ||
name: Install Node | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ github.event.inputs.version }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ github.event.inputs.version }} |
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 |
---|---|---|
@@ -1,25 +1,35 @@ | ||
name: '[Workflow] Pnpm' | ||
author: miguelramos | ||
branding: | ||
color: 'orange' | ||
icon: 'package' | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
NPM_TOKEN: | ||
required: true | ||
inputs: | ||
secrets: | ||
NPM_TOKEN: | ||
required: true | ||
|
||
env: | ||
CI: true | ||
PNPM_CACHE_FOLDER: .pnpm-store | ||
runs: | ||
using: "composite" | ||
env: | ||
CI: true | ||
PNPM_CACHE_FOLDER: ~/.pnpm-store | ||
steps: | ||
- name: Restore cache for pnpm and node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.pnpm-store | ||
**/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}- | ||
jobs: | ||
install-pnpm: | ||
name: Install pnpm | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install pnpm package manager | ||
run: npm i pnpm@latest -g | ||
- name: Install pnpm package manager | ||
run: npm i pnpm@latest -g | ||
|
||
- name: Setup npmrc | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc | ||
- name: Setup npmrc | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc | ||
|
||
- name: Setup pnpm config | ||
run: pnpm config set store-dir $PNPM_CACHE_FOLDER | ||
- name: Setup pnpm config | ||
run: pnpm config set store-dir $PNPM_CACHE_FOLDER |