Skip to content

chore(deps): update dependency node to v20.9.0 #3747

chore(deps): update dependency node to v20.9.0

chore(deps): update dependency node to v20.9.0 #3747

Workflow file for this run

name: Test, build and push
on:
push:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
pre-commit:
runs-on: ubuntu-latest
permissions:
packages: read
steps:
- uses: actions/[email protected]
- name: Cache dependencies
uses: actions/[email protected]
with:
node-version: '20'
cache: 'npm'
- name: set npm auth
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
- name: install node modules
run: npm ci
- uses: pre-commit/[email protected]
cypress:
runs-on: ubuntu-latest
permissions:
packages: read
# Current backend version as service container
services:
backend:
image: ghcr.io/envelope-zero/backend:v3.1.3
env:
CORS_ALLOW_ORIGINS: http://localhost:3000
API_URL: http://localhost:3000/api
ports:
- 8080:8080
steps:
- uses: actions/[email protected]
- name: set npm auth
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
- uses: cypress-io/[email protected]
with:
start: npm run start-ci
# Frontend runs on :3000, API on :8080
wait-on: 'http://localhost:3000, http://localhost:8080'
browser: chrome
- uses: actions/[email protected]
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/[email protected]
if: failure()
with:
name: cypress-videos
path: cypress/videos
build-and-push-image:
needs:
- pre-commit
- cypress
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/[email protected]
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VITE_VERSION=${{ github.ref_name }}
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}