Skip to content

🎉 Start PathSeeker #5

🎉 Start PathSeeker

🎉 Start PathSeeker #5

name: Publish latest frontend image
on:
push:
branches:
- main
jobs:
build:
name: Build Vue
runs-on: ubuntu-latest
steps:
- name: ↩️ Checkout
uses: actions/checkout@v3
- name: 🏗️ Install Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: 🏗️ Install packages
run: cd frontend && npm ci
- name: ⚙️ Build application
run: cd frontend && npm run build
- name: 🗄️ Upload Artifact
uses: actions/upload-artifact@v3
with:
name: frontend
path: frontend/dist/*
image:
name: Build Docker image
runs-on: ubuntu-latest
needs:
- build
steps:
- name: ↩️ Checkout
uses: actions/checkout@v3
- name: 🗄️ Download artifact
uses: actions/download-artifact@v3
with:
name: frontend
path: frontend/dist/
- name: ℹ️ Docker meta
id: docker_meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/poeschl/pathseeker
tags: frontend
- name: 🏗️ Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: 🔑 GHCR Login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🚀 Build and push
uses: docker/build-push-action@v4
with:
context: frontend
file: frontend/docker/Dockerfile
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}