Skip to content

feat(ci): added frontend build #10

feat(ci): added frontend build

feat(ci): added frontend build #10

Workflow file for this run

name: ci-workflow
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
jobs:
check:
name: run pre-commit hooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- uses: pre-commit/action@v3.0.1
build-frontend:
name: run frontend build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs:
- check
steps:
- uses: actions/checkout@v4.1.7
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
frontend:
- 'web/**'
- name: Login to GitHub Container Registry
if: steps.filter.outputs.frontend == 'true'
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
if: steps.filter.outputs.frontend == 'true'
id: meta
uses: docker/metadata-action@v5.5.1
with:
images: akorzunin/supericosahedron-frontend
- name: Set up Docker Buildx
if: steps.filter.outputs.frontend == 'true'
uses: docker/setup-buildx-action@v3.6.1
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
- name: Build and push Docker image
if: steps.filter.outputs.frontend == 'true'
id: push
uses: docker/build-push-action@v6.5.0
with:
context: .
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
file: ./web/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}