Skip to content

edge-cockpit CI on branch >> main << #11

edge-cockpit CI on branch >> main <<

edge-cockpit CI on branch >> main << #11

name: CI edge-cockpit
run-name: edge-cockpit CI on branch >> ${{ github.ref_name }} <<
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
paths:
- "edge/cockpit/**"
jobs:
lint_and_test_on_edge_cockpit:
name: Run JS linter and unit tests
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: "./edge/cockpit/package-lock.json"
- name: Install dependencies
run: make install
working-directory: ./edge/cockpit
- name: TypeScript type check
run: make type_check
working-directory: ./edge/cockpit
- name: Run unit tests
run: make unit_tests
working-directory: ./edge/cockpit
build_and_push_images:
needs: lint_and_test_on_edge_cockpit
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./edge/cockpit/Dockerfile
image: ghcr.io/${{ github.repository }}/edge_cockpit
context: ./edge/cockpit
uses: ./.github/workflows/template_build_and_push_docker_images.yml
with:
context: ${{ matrix.context }}
dockerfile: ${{ matrix.dockerfile }}
image: ${{ matrix.image }}
secrets:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}