Files
learning-platform/.github/workflows/publish-image.yml
RaymondVerhoef e783c5f1e7
Some checks failed
On Push to Main / test (push) Has been cancelled
On Push to Main / publish (push) Has been cancelled
On Push to Main / deploy-dev (push) Has been cancelled
feat: implement Docker-based production deployment pipeline with automated Ansible provisioning, CI/CD workflows, and Caddy server configuration.
2026-05-14 10:21:42 +02:00

57 lines
1.4 KiB
YAML

name: Publish Image
on:
workflow_call:
inputs:
build_mode:
description: "Build mode (development or production)"
type: string
default: production
workflow_dispatch:
inputs:
build_mode:
description: "Build mode (development or production)"
type: string
default: production
env:
REGISTRY: git.labs.respellion.tech
IMAGE: respellion/learning-platform/learning-platform
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: respellion-bot
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE }}
tags: |
type=sha,format=short,prefix=
type=raw,value=latest
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_MODE=${{ inputs.build_mode }}