mirror of
https://github.com/ivuorinen/gh-action-readme.git
synced 2026-01-26 03:04:10 +00:00
53 lines
1.2 KiB
YAML
53 lines
1.2 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@v4
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ github.token }}
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
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@v4
|
|
id: build
|
|
with:
|
|
node-version: ${{ inputs.node-version }}
|
|
|
|
branding:
|
|
icon: package
|
|
color: blue |