mirror of
https://github.com/daeuniverse/honk.git
synced 2026-12-05 08:01:17 +00:00
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.7.0 to 4.8.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/81c6f93d4bc991e510b342a00b419b3bb4efc5c6...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> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
83 lines
2.8 KiB
YAML
83 lines
2.8 KiB
YAML
name: Docker
|
|
|
|
# The image repackages the published release archives, so it is built when a
|
|
# release is published, not when the tag creates the draft.
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: Published release version without v, such as 0.1.0-beta.4
|
|
required: true
|
|
push:
|
|
description: Push the image to GitHub Container Registry
|
|
type: boolean
|
|
default: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: docker-${{ github.event.release.tag_name || format('v{0}', inputs.version) }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
docker:
|
|
name: image
|
|
# Debug releases are not images.
|
|
if: github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'v')
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 20
|
|
# GITHUB_TOKEN pushes to this repository's ghcr.io package; no registry secret is needed.
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Resolve tags
|
|
id: prep
|
|
env:
|
|
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
PRERELEASE: ${{ github.event.release.prerelease }}
|
|
INPUT_VERSION: ${{ inputs.version }}
|
|
run: |
|
|
set -euo pipefail
|
|
image=ghcr.io/daeuniverse/honk
|
|
if [[ "$GITHUB_EVENT_NAME" == release ]]; then
|
|
version=${RELEASE_TAG#v}
|
|
else
|
|
version=$INPUT_VERSION
|
|
# A manual run cannot tell a pre-release apart, so it never moves latest.
|
|
PRERELEASE=true
|
|
fi
|
|
tags="$image:$version"
|
|
[[ "$PRERELEASE" == true ]] || tags+=$'\n'"$image:latest"
|
|
{
|
|
echo "version=$version"
|
|
echo "tags<<EOF"
|
|
echo "$tags"
|
|
echo "EOF"
|
|
} >> "$GITHUB_OUTPUT"
|
|
|
|
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
if: github.event_name == 'release' || inputs.push
|
|
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
build-args: HONK_VERSION=${{ steps.prep.outputs.version }}
|
|
push: ${{ github.event_name == 'release' || inputs.push }}
|
|
tags: ${{ steps.prep.outputs.tags }}
|
|
# Links the package to this repository, so it lists under the repository and takes its permissions.
|
|
labels: org.opencontainers.image.source=https://github.com/${{ github.repository }}
|