Files
pkgmgr/.github/workflows/publish-containers.yml
T
dependabot[bot] 9421f69ea9 build(deps): bump docker/login-action from 4.6.0 to 4.8.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.6.0 to 4.8.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/dbcb813823bdd20940b903addbd779551569679f...8aa5831fb8d48d8f76594c7ddde61ae58019f550)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-09 00:16:23 +00:00

122 lines
3.7 KiB
YAML

name: Publish container images (GHCR)
on:
workflow_run:
workflows: ["Mark stable commit"]
types: [completed]
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
jobs:
prepare:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
releases: ${{ steps.info.outputs.releases }}
steps:
- name: Checkout repository (with tags)
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Resolve the releases this run publishes
id: info
env:
WORKFLOW_RUN_SHA: ${{ github.event.workflow_run.head_sha }}
run: bash scripts/github/publish-containers/compute-publish-container-info.sh
build:
needs: prepare
if: ${{ needs.prepare.result == 'success' && needs.prepare.outputs.releases != '[]' }}
name: Build ${{ matrix.distro }} ${{ matrix.release.version }} for ${{ matrix.target.platform }}
runs-on: ${{ matrix.target.runner }}
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
distro: &distros [arch, debian, ubuntu, fedora, centos]
target:
- platform: linux/amd64
runner: ubuntu-latest
- platform: linux/arm64
runner: ubuntu-24.04-arm
release: ${{ fromJSON(needs.prepare.outputs.releases) }}
steps:
- name: Checkout ${{ matrix.release.version }}
uses: actions/checkout@v7
with:
ref: ${{ matrix.release.sha }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@594f3bf4285d9ea8dc53c9a0c9c4092420091003
with:
use: true
- name: Login to GHCR
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push ${{ matrix.distro }} ${{ matrix.release.version }} for ${{ matrix.target.platform }}
env:
OWNER: ${{ github.repository_owner }}
VERSION: ${{ matrix.release.version }}
PKGMGR_DISTRO: ${{ matrix.distro }}
PLATFORM: ${{ matrix.target.platform }}
run: bash scripts/github/publish-containers/publish-container-images.sh
merge:
needs: [prepare, build]
if: ${{ !cancelled() && needs.prepare.result == 'success' && needs.prepare.outputs.releases != '[]' }}
name: Merge ${{ matrix.distro }} ${{ matrix.release.version }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
distro: *distros
release: ${{ fromJSON(needs.prepare.outputs.releases) }}
steps:
- name: Checkout ${{ matrix.release.version }}
uses: actions/checkout@v7
with:
ref: ${{ matrix.release.sha }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@594f3bf4285d9ea8dc53c9a0c9c4092420091003
with:
use: true
- name: Login to GHCR
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Join both platforms of ${{ matrix.distro }} ${{ matrix.release.version }} under its tags
env:
OWNER: ${{ github.repository_owner }}
VERSION: ${{ matrix.release.version }}
ALIASES: ${{ matrix.release.aliases }}
PKGMGR_DISTRO: ${{ matrix.distro }}
run: bash scripts/github/publish-containers/merge-container-images.sh