Files
afilmory/.github/workflows/core-image.yml
Innei 1c64070a5d feat: add GitHub Actions workflow for building and publishing core Docker image
- Introduced a new GitHub Actions workflow in `core-image.yml` to automate the build and publish process for the core Docker image.
- The workflow triggers on pushes to the main branch and supports manual dispatch.
- Configured steps for checking out the repository, setting up Docker Buildx, logging into the GitHub Container Registry, extracting Docker metadata, and building and pushing the Docker image.

Additionally, updated documentation to reflect changes in the deployment process, including a new section for multi-tenant SaaS deployment.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-23 20:22:23 +08:00

54 lines
1.3 KiB
YAML

name: Build & Publish core Docker image
on:
push:
branches:
- main
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: afilmory/afilmory-core
jobs:
build-and-push-core:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata (tags & labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest
type=sha,format=short
type=ref,event=branch
type=ref,event=tag
- name: Build and push Docker image (core)
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile.core
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}