Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/sxzz/workflows. A opinionated collection of reusable GitHub Actions workflows for TypeScript projec
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960name: Setup JavaScriptdescription: Setup JavaScript environment
inputs: persist-credentials: description: Whether to configure the token or SSH key with the local git config default: 'false'
fetch-all: description: Whether to fetch all history for all branches and tags. default: 'false'
node-version: description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.' default: 'lts/*'
auto-install: description: Whether to automatically install dependencies. default: 'true'
package-manager: description: 'Package manager to use. Examples: npm, yarn, pnpm.' default: pnpm
no-frozen-lockfile: description: Whether to disable frozen lockfile installation. default: 'false'
cache: description: Whether to enable caching for node modules. default: 'true'
runs: using: composite steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: ${{ inputs.persist-credentials }} fetch-depth: "${{ inputs.fetch-all == 'true' && '0' || '1' }}"
- name: Install pnpm uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 if: ${{ inputs.package-manager == 'pnpm' }}
- name: Setup node uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: ${{ inputs.node-version }} cache: ${{ inputs.cache == 'true' && inputs.package-manager || '' }} package-manager-cache: ${{ inputs.cache }} registry-url: 'https://registry.npmjs.org'
- name: Install dependencies shell: bash run: ${{ inputs.package-manager }} install ${{ inputs.no-frozen-lockfile == 'true' && '--no-frozen-lockfile' || '' }} if: ${{ inputs.auto-install }}