Skip to content

Fix scan form and minor UI improvements #7

Fix scan form and minor UI improvements

Fix scan form and minor UI improvements #7

Workflow file for this run

name: Web CI
on:
push:
paths:
- "packages/web/**"
- ".github/workflows/web-ci.yml"
pull_request:
paths:
- "packages/web/**"
- ".github/workflows/web-ci.yml"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: packages/web/package-lock.json
- name: Install dependencies
working-directory: packages/web
run: npm ci
- name: Run ESLint
working-directory: packages/web
run: npm run lint
- name: Check Prettier formatting
working-directory: packages/web
run: npm run format:check
- name: TypeScript type check
working-directory: packages/web
run: npx tsc --noEmit
build:
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/jfmlima/shelly-manager-web
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: packages/web
file: packages/web/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max