Skip to content

1 - webapp

1 - webapp #1

Workflow file for this run

# This workflow performs basic checks:
#
# 1. run a preparation step to install and cache node modules
# 2. once prep succeeds, run lint and test in parallel
#
# The checks are skipped on the 'main' branch. The project relies on branch
# protection to avoid pushes straight to 'main'.
name: Checks
on:
push:
branches-ignore:
- 'main'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
prep:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Cache node_modules
uses: actions/cache@v3
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
- name: Install
run: yarn install
lint:
needs: prep
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Cache node_modules
uses: actions/cache@v3
id: cache-node-modules
working-directory: ./webapp

Check failure on line 60 in .github/workflows/webapp.yaml

View workflow run for this annotation

GitHub Actions / Checks

Invalid workflow file

The workflow is not valid. .github/workflows/webapp.yaml (Line: 60, Col: 9): Unexpected value 'working-directory' .github/workflows/webapp.yaml (Line: 90, Col: 9): Unexpected value 'working-directory'
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
- name: Install
run: yarn install
working-directory: ./webapp
- name: Lint
run: yarn lint
working-directory: ./webapp
# Docker container build
build:
needs: prep
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Cache node_modules
uses: actions/cache@v3
id: cache-node-modules
working-directory: ./webapp
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
- name: Install
run: yarn install
working-directory: ./webapp
- name: Build container
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
context: .
file: dockerfiles/Dockerfile
push: false
tags: "polder:dev"