Skip to content

v0.0.6

v0.0.6 #11

Workflow file for this run

name: Release Run
on:
release:
types: [published]
jobs:
build:
name: Build Docker Images
runs-on: ubuntu-latest
steps:
- name: downcase REPO
id: lowercase
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
- name: Checkout
uses: actions/checkout@v4
- name: Get Version Tag
id: version
run: |
CURRENT_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
VERSION=$(echo $CURRENT_TAG | grep -oP "(?<=v)[\d.]+")
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
- name: Update API Version
run: |
sed -i "s/version=\"[^\"]*\"/version=\"${{ steps.version.outputs.VERSION }}\"/" backend/api/routes.py
- name: Update Angular App Version
run: |
cd frontend
npm --no-git-tag-version version from-git
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node 20.x
uses: actions/setup-node@v4
with:
node-version: 20.12.2
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install Angular CLI
run: npm install -g @angular/cli
- name: Build & push frontend
uses: docker/build-push-action@v5
with:
context: ./frontend
file: ./frontend/Dockerfile.prod
push: true
tags: |
ghcr.io/${{ steps.lowercase.outputs.REPO }}/frontend:latest
ghcr.io/${{ steps.lowercase.outputs.REPO }}/frontend:${{ steps.version.outputs.VERSION }}
- name: Build & push backend
uses: docker/build-push-action@v5
with:
context: ./backend
file: ./backend/Dockerfile
push: true
tags: |
ghcr.io/${{ steps.lowercase.outputs.REPO }}/backend:latest
ghcr.io/${{ steps.lowercase.outputs.REPO }}/backend:${{ steps.version.outputs.VERSION }}