mirror of
https://github.com/yanhao98/composite-actions.git
synced 2025-07-13 06:40:49 +08:00
56 lines
1.1 KiB
YAML
56 lines
1.1 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "setup-node-environment/**"
|
|
- ".github/workflows/setup-node-environment.yml"
|
|
env:
|
|
TZ: Asia/Shanghai
|
|
|
|
jobs:
|
|
job:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
container-image: ["", "yanhao98/runner-images:pnpm"]
|
|
container:
|
|
image: ${{ matrix.container-image }}
|
|
steps:
|
|
- name: before
|
|
run: |
|
|
set -x;
|
|
which pnpm || true;
|
|
node -v;
|
|
|
|
- uses: yanhao98/composite-actions/setup-node-environment@main
|
|
|
|
- name: Check Node and PNPM versions
|
|
run: |
|
|
set -x;
|
|
which pnpm;
|
|
node -v;
|
|
pnpm node -v;
|
|
|
|
job-2:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
- name: before
|
|
run: |
|
|
set -x;
|
|
sed -i '/use-node-version/d' .npmrc
|
|
node -v;
|
|
cat .npmrc;
|
|
|
|
|
|
- uses: yanhao98/composite-actions/setup-node-environment@main
|
|
|
|
- name: Check Node and PNPM versions
|
|
run: |
|
|
set -x;
|
|
which pnpm;
|
|
node -v;
|
|
pnpm node -v;
|