Files
xdrop/.github/workflows/publish-images.yml
T
dependabot[bot] ce1021a44b deps(ci): bump docker/setup-qemu-action from 3 to 4 (#4)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-25 01:11:22 +00:00

86 lines
2.1 KiB
YAML

name: Publish Images
on:
workflow_run:
workflows:
- CI
types:
- completed
branches:
- main
workflow_dispatch:
inputs:
confirm_publish:
description: 'Type publish to confirm a manual image release'
required: true
type: string
concurrency:
group: publish-images-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
packages: write
id-token: write
jobs:
publish:
name: Publish Xdrop
runs-on: ubuntu-latest
timeout-minutes: 30
if: >-
${{
(
github.event_name == 'workflow_dispatch' &&
github.event.inputs.confirm_publish == 'publish'
) ||
github.event.workflow_run.conclusion == 'success'
}}
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Log in
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract image metadata
id: meta
uses: docker/metadata-action@v6
with:
images: ghcr.io/${{ github.repository_owner }}/xdrop
tags: |
type=raw,value=main
type=sha
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push image
uses: docker/build-push-action@v7
with:
context: .
file: Dockerfile
push: true
platforms: linux/amd64,linux/arm64
build-args: |
VITE_SITE_URL=${{ vars.VITE_SITE_URL }}
VITE_API_BASE_URL=/api/v1
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: true
sbom: true