Skip to content

0.18.2

0.18.2 #75

Workflow file for this run

name: Build Coroot
on:
release:
types: [created]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
VERSION: ${{ github.event.release.tag_name }}
jobs:
build-frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./front/
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
cache: 'npm'
cache-dependency-path: ./front/package-lock.json
- run: npm ci
- run: npm version ${{ env.VERSION }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npx vue-cli-service build --dest=../static src/main.js
- uses: actions/upload-artifact@v3
with:
name: static
path: ./static
build-images:
needs: build-frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- run: sed -i 's/--from=frontend-builder/--from=backend-builder/' Dockerfile
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/metadata-action@v4
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
- uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64, linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ steps.meta.outputs.version }}