mirror of
https://github.com/ivuorinen/gh-action-readme.git
synced 2026-02-01 14:43:39 +00:00
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
---
|
|
name: Composite Example Action
|
|
description: 'Test Composite Action for gh-action-readme dependency analysis'
|
|
inputs:
|
|
node-version:
|
|
description: Node.js version to use
|
|
required: false
|
|
default: '20'
|
|
working-directory:
|
|
description: Working directory
|
|
required: false
|
|
default: '.'
|
|
outputs:
|
|
build-result:
|
|
description: Build result status
|
|
value: ${{ steps.build.outputs.result }}
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ github.token }}
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
with:
|
|
node-version: ${{ inputs.node-version }}
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
shell: bash
|
|
run: |
|
|
cd ${{ inputs.working-directory }}
|
|
npm ci
|
|
|
|
- name: Run tests
|
|
shell: bash
|
|
run: |
|
|
npm test
|
|
echo "Tests completed successfully"
|
|
env:
|
|
NODE_ENV: test
|
|
|
|
- name: Build project
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
id: build
|
|
with:
|
|
node-version: ${{ inputs.node-version }}
|
|
|
|
branding:
|
|
icon: package
|
|
color: blue
|