mirror of
https://github.com/yanhao98/composite-actions.git
synced 2025-07-13 06:40:49 +08:00
更新 CI 工作流,使用新的 composite action 设置 Node.js 和 PNPM 环境
Some checks failed
/ another-job (push) Failing after 7s
Some checks failed
/ another-job (push) Failing after 7s
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -4,7 +4,7 @@ jobs:
|
||||
another-job:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: yanhao98/composite-actions/action.yml@main
|
||||
- uses: yanhao98/composite-actions/setup-node-pnpm-install@main
|
||||
- run: |
|
||||
node --version
|
||||
pnpm --version
|
34
setup-node-pnpm-install/action.yml
Normal file
34
setup-node-pnpm-install/action.yml
Normal file
@ -0,0 +1,34 @@
|
||||
# 🔗 Links:
|
||||
# Source file: https://github.com/obytes/react-native-template-obytes/blob/master/.github/actions/setup-node-pnpm-install/action.yml
|
||||
# Composite actions docs: https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
|
||||
|
||||
# ✍️ Description:
|
||||
# This is a composite action, which means it can be used in other actions.
|
||||
# It is used in almost all workflows to set up the environment and install dependencies.
|
||||
# Updating the package manager or Node version here will be reflected in all workflows.
|
||||
|
||||
# 👀 Example usage:
|
||||
# - name : 📦 Setup Node + PNPM + install deps
|
||||
# uses: ./.github/actions/setup-node-pnpm-install
|
||||
|
||||
name: 'Setup Node + PNPM + Install Dependencies'
|
||||
description: 'Setup Node + PNPM + Install Dependencies'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: latest
|
||||
run_install: false
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
# cache: 'pnpm'
|
||||
- name: Check Node and PNPM versions
|
||||
shell: bash
|
||||
run: |
|
||||
node --version
|
||||
pnpm --version
|
||||
# - name: 📦 Install Project Dependencies
|
||||
# run: pnpm install --frozen-lockfile
|
||||
# shell: bash
|
Reference in New Issue
Block a user