airi/.github/workflows/release-docker.yaml
Rin f85a809d7c
refactor(stage-*): analytics and telemetry, including consent (#1414)
---------

Co-authored-by-agent: Codex <267193182+codex@users.noreply.github.com>
Co-authored-by-agent: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: RainbowBird <rbxin2003@outlook.com>
Co-authored-by: Neko <neko@ayaka.moe>
2026-03-24 13:01:39 +08:00

55 lines
1.6 KiB
YAML

name: Release Docker / OCI
on:
push:
tags:
- '**'
workflow_dispatch:
jobs:
ghcr_build:
name: Release
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
# Why?
#
# failed to build archive at `/home/runner/work/airi/airi/target/x86_64-unknown-linux-gnu/release/deps/libapp_lib.rlib`:
# No space left on device (os error 28)
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
- uses: actions/checkout@v6
- uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/${{ github.repository }}
flavor: |
latest=true
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
context: ./
file: ./apps/stage-web/Dockerfile
build-args: |
VITE_ENABLE_POSTHOG=true
platforms: linux/amd64,linux/arm64,linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}