mirror of
https://github.com/moeru-ai/airi.git
synced 2026-08-14 00:48:06 +00:00
58 lines
1.7 KiB
YAML
58 lines
1.7 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@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
|
|
|
|
- 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
|
|
provenance: mode=max
|
|
sbom: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|