Skip to content

Bump the angular group in /frontend with 13 updates #259

Bump the angular group in /frontend with 13 updates

Bump the angular group in /frontend with 13 updates #259

Workflow file for this run

name: Build frontend
on:
push:
branches: [ master ]
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches: [ master ]
paths: [ 'frontend/**' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Write release version
if: startsWith(github.ref, 'refs/tags/')
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Install dependencies
working-directory: frontend/
run: npm install
- name: Generate Graphql
working-directory: frontend/
run: npm run generate
- name: Build
working-directory: frontend/
run: npm run build
- name: Lint
working-directory: frontend/
run: npm run lint
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: frontend
path: frontend/
retention-days: 1
publish:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: frontend
path: frontend/
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push latest
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: frontend/
push: true
tags: spoud/kafka-cost-control-ui:latest
- name: Build and push tag
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: frontend/
push: true
tags: spoud/kafka-cost-control-ui:${{ env.VERSION }}