Skip to content

Release 0.2.3

Release 0.2.3 #13

Workflow file for this run

name: Publish Docker Images
on:
release:
types: [published]
env:
REGISTRY: ghcr.io
FRONTEND_IMAGE_NAME: ${{ github.repository }}-frontend
SERVER_IMAGE_NAME: ${{ github.repository }}-server
jobs:
build-and-push-frontend:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.FRONTEND_IMAGE_NAME }}
- name: Build and push image
uses: docker/build-push-action@v3
with:
context: .
file: frontend.Dockerfile
push: true
build-args: VITE_BACKEND_URL=/api
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-and-push-server:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.SERVER_IMAGE_NAME }}
- name: Build and push image
uses: docker/build-push-action@v3
with:
context: .
file: server.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}