refactor: use 'setup' composite actions in workflows

This commit is contained in:
MuhammadM1998 2024-05-24 21:19:37 +03:00
parent 4cca67925f
commit 0a0c75d330
3 changed files with 6 additions and 50 deletions

View File

@ -50,30 +50,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
# Run a build step here
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 9.1.2
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup (Install Node & pnpm)
uses: ./.github/actions/setup
- name: Install dependencies
run: pnpm i --frozen-lockfile

View File

@ -18,9 +18,8 @@ jobs:
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Setup (Install Node & pnpm)
uses: ./.github/actions/setup
- run: npx changelogithub
env:

View File

@ -21,29 +21,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 9.1.2
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup (Install Node & pnpm)
uses: ./.github/actions/setup
- name: Install dependencies
run: pnpm i --frozen-lockfile