Files
xdrop/.github/workflows/publish-images.yml
T
dependabot[bot] 97b91ec802 deps(ci): bump actions/checkout from 6 to 7 (#45)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  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-06-24 01:07:51 +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@v7
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