Skip to content

Workflow file for this run

name: Build and create release image tag
on:
release:
types: [published, edited]
jobs:
build-and-push:
name: Build and push from ${{ github.ref_name }}/${{ github.event.release.tag_name }}
runs-on: ubuntu-latest
env:
APP_IMAGE_NAME: ghcr.io/${{ github.repository }}/app
UI_IMAGE_NAME: ghcr.io/${{ github.repository }}/ui
IMAGE_TAG: ${{ github.event.release.tag_name }}
outputs:
commit_title: ${{ steps.get_head_commit_title.outputs.title }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- id: get_head_commit_title
run: echo "title=$(git log --format=%B -n 1 HEAD | head -n 1)" >> $GITHUB_OUTPUT
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push app
uses: docker/build-push-action@v6
with:
context: .
file: ./app/Dockerfile
push: true
tags: ${{ env.APP_IMAGE_NAME }}:${{ env.IMAGE_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push ui
uses: docker/build-push-action@v6
with:
context: .
file: ./ui/Dockerfile
push: true
tags: ${{ env.UI_IMAGE_NAME }}:${{ env.IMAGE_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max