Skip to content

add docker compose

add docker compose #2

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
env:
environment: production
concurrency:
group: ci-prod
cancel-in-progress: true
permissions:
contents: write
packages: write
id-token: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set version
run: echo "${GITHUB_REF#refs/*/}_${GITHUB_SHA::6}" > ./VERSION
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
cache-from: type=gha
cache-to: type=gha,mode=max