Skip to content

Update use-reuseble-file.yml #11

Update use-reuseble-file.yml

Update use-reuseble-file.yml #11

name: Using Reuseble Workflow
on:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Get code
uses: actions/checkout@v3
- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: ~/.npm
key: deps-node-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: steps.cache.output.cache-hit != 'true'
run: npm ci
- name: Lint code
run: npm run lint
test:
runs-on: ubuntu-latest
steps:
- name: Get code
uses: actions/checkout@v3
- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: ~/.npm
key: deps-node-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: steps.cache.output.cache-hit != 'true'
run: npm ci
- name: Test code
id: run-tests
run: npm run test
- name: Upload test report
if: failure() && steps.run-tests.outcome == 'failure'
uses: actions/upload-artifact@v3
with:
name: test-report
path: test.json
build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Get code
uses: actions/checkout@v3
- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: ~/.npm
key: deps-node-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Build website
id: build-website
run: npm run build
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: dist-files
path: dist
deploy:
needs: build
# This job reuses another workflow defined in the file at the specified path
uses: ./.github/workflows/reuseble.yml

Check failure on line 71 in .github/workflows/use-reuseble-file.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/use-reuseble-file.yml

Invalid workflow file

error parsing called workflow ".github/workflows/use-reuseble-file.yml" -> "./.github/workflows/reuseble.yml" (source branch with sha:26ebb8808d51f7a1d49a4474a9143205d1c3ba2f) : Invalid type for `on`
with:
# The "artifact-name" parameter is set to the value "dist-files"
artifact-name: dist-files
report:
needs: [lint, deploy]
if: failure()
runs-on: ubuntu-latest
steps:
- name: Output information
run: |
echo "Something went wrong"
echo "${{ GITHUB }}"