Skip to content

Adding to GitHub

Adding to GitHub #1

Workflow file for this run

name: "Test"
on:
workflow_dispatch:
push:
jobs:
test:
name: "Test"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Test to JSON"
id: test
uses: ./
with:
source: .github/test/test.env
dest: .github/test/results.json
- name: "Echo JSON"
run: |
echo '${{ steps.test.outputs.result }}'
cat .github/test/results.json
- name: "Test to Environment"
id: test

Check failure on line 30 in .github/workflows/test.yaml

View workflow run for this annotation

GitHub Actions / Test

Invalid workflow file

The workflow is not valid. .github/workflows/test.yaml (Line: 30, Col: 13): The identifier 'test' may not be used more than once within the same scope.
uses: ./
with:
source: .github/test/test.json
dest: .github/test/results.env
type: "env"
- name: "Echo Environment"
run: |
echo '${{ steps.test.outputs.result }}'
cat .github/test/results.env
lint:
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup Node"
uses: actions/setup-node@v4
with:
node-version: 20
- name: "ESLint"
run: |
npm install
npm run lint
build:
name: "Build"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup Node"
uses: actions/setup-node@v4
with:
node-version: 20
- name: "Build"
run: |
npm install
npm run build
- name: "Verify"
run: |
git status --porcelain dist/
if [ ! -d "dist" ];then
echo "Missing dist directory, run: npm build"
exit 1
fi
if [ -n "$(git status --porcelain dist)" ];then
echo "Build was not run, run: npm build"
exit 1
fi