Skip to content

Merge pull request #960 from NERC-CEH/dependabot/npm_and_yarn/code/ta… #326

Merge pull request #960 from NERC-CEH/dependabot/npm_and_yarn/code/ta…

Merge pull request #960 from NERC-CEH/dependabot/npm_and_yarn/code/ta… #326

Workflow file for this run

name: Push action
on:
push:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
container:
[
"api",
"app",
"docs",
"infrastructure",
"authorisation",
"common",
"chassis",
]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache node modules
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-cache-${{ matrix.container }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: npm-cache-${{ matrix.container }}-
- name: Set up node
uses: actions/setup-node@v1
with:
node-version: "20"
- name: Validate build
run: ./build/validate-build.sh ${{ matrix.container }}
shell: bash
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
run: ./build/build-container.sh ${{ matrix.container }} --push
shell: bash