121 lines
3.6 KiB
YAML
121 lines
3.6 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: "Version to release (e.g., v1.0.0)"
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: [ubuntu-latest]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.allucanget.biz
|
|
username: ${{ secrets.CI_REGISTRY_USER }}
|
|
password: ${{ secrets.CI_REGISTRY_TOKEN }}
|
|
|
|
- name: Extract version
|
|
id: version
|
|
run: |
|
|
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
|
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Extract metadata for Playout
|
|
id: meta-playout
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: git.allucanget.biz/zwitschi/linearvoid/playout
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=raw,value=latest
|
|
|
|
- name: Build and push Playout image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./backend/playout
|
|
push: true
|
|
tags: ${{ steps.meta-playout.outputs.tags }}
|
|
labels: ${{ steps.meta-playout.outputs.labels }}
|
|
|
|
- name: Extract metadata for Chat
|
|
id: meta-chat
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: git.allucanget.biz/zwitschi/linearvoid/chat
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=raw,value=latest
|
|
|
|
- name: Build and push Chat image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./backend/chat
|
|
push: true
|
|
tags: ${{ steps.meta-chat.outputs.tags }}
|
|
labels: ${{ steps.meta-chat.outputs.labels }}
|
|
|
|
- name: Extract metadata for Frontend
|
|
id: meta-frontend
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: git.allucanget.biz/zwitschi/linearvoid/frontend
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=raw,value=latest
|
|
|
|
- name: Build and push Frontend image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./frontend
|
|
push: true
|
|
tags: ${{ steps.meta-frontend.outputs.tags }}
|
|
labels: ${{ steps.meta-frontend.outputs.labels }}
|
|
|
|
- name: Extract metadata for Nginx
|
|
id: meta-nginx
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: git.allucanget.biz/zwitschi/linearvoid/nginx
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=raw,value=latest
|
|
|
|
- name: Build and push Nginx image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./infrastructure/nginx
|
|
push: true
|
|
tags: ${{ steps.meta-nginx.outputs.tags }}
|
|
labels: ${{ steps.meta-nginx.outputs.labels }}
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
generate_release_notes: true
|
|
tag_name: ${{ steps.version.outputs.version }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.CI_REGISTRY_TOKEN }}
|