44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: Release to GitHub Packages
|
|
description: Release to GitHub Packages
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
sparse-checkout: |
|
|
Dockerfile
|
|
sparse-checkout-cone-mode: false
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: binary
|
|
path: '${{ github.workspace }}/dist'
|
|
- uses: docker/setup-qemu-action@v3
|
|
- uses: docker/setup-buildx-action@v3
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ github.token }}
|
|
- id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ghcr.io/${{ github.repository }}
|
|
- id: push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
target: yutu
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
annotations: ${{ steps.meta.outputs.annotations }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
platforms: linux/amd64,linux/arm64
|
|
provenance: true
|
|
sbom: true
|
|
- uses: actions/attest-build-provenance@v2
|
|
with:
|
|
subject-name: ghcr.io/${{ github.repository }}
|
|
subject-digest: ${{ steps.push.outputs.digest }}
|
|
push-to-registry: true
|