feat(dist): add GHCR push and Homebrew tap to release pipeline
Docker releases now dual-push to Docker Hub and ghcr.io/lerkolabs/uptop. GoReleaser brews section generates a Homebrew formula and pushes to lerkolabs/homebrew-tap on GitHub. Requires new Gitea secrets: - GHCR_USERNAME / GHCR_TOKEN for GHCR login - HOMEBREW_TAP_GITHUB_TOKEN for tap repo push - GitHub repo lerkolabs/homebrew-tap must exist
This commit was merged in pull request #141.
This commit is contained in:
@@ -53,6 +53,7 @@ jobs:
|
|||||||
GORELEASER_FORCE_TOKEN: gitea
|
GORELEASER_FORCE_TOKEN: gitea
|
||||||
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
GITEA_API_URL: http://gitea:3000/api/v1
|
GITEA_API_URL: http://gitea:3000/api/v1
|
||||||
|
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
|
||||||
|
|
||||||
# GitHub release relaying is handled by .github/workflows/mirror-release.yml,
|
# GitHub release relaying is handled by .github/workflows/mirror-release.yml,
|
||||||
# which runs on GitHub Actions when the push mirror delivers the tag and
|
# which runs on GitHub Actions when the push mirror delivers the tag and
|
||||||
|
|||||||
@@ -35,11 +35,16 @@ jobs:
|
|||||||
|
|
||||||
TAGS="lerkolabs/uptop:${TAG}"
|
TAGS="lerkolabs/uptop:${TAG}"
|
||||||
TAGS="${TAGS},lerkolabs/uptop:sha-${SHORT_SHA}"
|
TAGS="${TAGS},lerkolabs/uptop:sha-${SHORT_SHA}"
|
||||||
|
TAGS="${TAGS},ghcr.io/lerkolabs/uptop:${TAG}"
|
||||||
|
TAGS="${TAGS},ghcr.io/lerkolabs/uptop:sha-${SHORT_SHA}"
|
||||||
# :latest only for real releases — rc rehearsal tags must not move it
|
# :latest only for real releases — rc rehearsal tags must not move it
|
||||||
if [ "${{ github.ref_type }}" = "tag" ]; then
|
if [ "${{ github.ref_type }}" = "tag" ]; then
|
||||||
case "$TAG" in
|
case "$TAG" in
|
||||||
*-*) ;;
|
*-*) ;;
|
||||||
*) TAGS="${TAGS},lerkolabs/uptop:latest" ;;
|
*)
|
||||||
|
TAGS="${TAGS},lerkolabs/uptop:latest"
|
||||||
|
TAGS="${TAGS},ghcr.io/lerkolabs/uptop:latest"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
|
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
|
||||||
@@ -56,6 +61,13 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Log in to GHCR
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ secrets.GHCR_USERNAME }}
|
||||||
|
password: ${{ secrets.GHCR_TOKEN }}
|
||||||
|
|
||||||
# Scan must gate the push: build amd64 locally, scan it, and only then run
|
# Scan must gate the push: build amd64 locally, scan it, and only then run
|
||||||
# the multi-arch push (amd64 layers come from the builder cache, so the
|
# the multi-arch push (amd64 layers come from the builder cache, so the
|
||||||
# second build only adds the arm64 work).
|
# second build only adds the arm64 work).
|
||||||
|
|||||||
@@ -59,6 +59,24 @@ nfpms:
|
|||||||
dst: /usr/share/doc/uptop/LICENSE
|
dst: /usr/share/doc/uptop/LICENSE
|
||||||
type: doc
|
type: doc
|
||||||
|
|
||||||
|
brews:
|
||||||
|
- name: uptop
|
||||||
|
repository:
|
||||||
|
owner: lerkolabs
|
||||||
|
name: homebrew-tap
|
||||||
|
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
|
||||||
|
url_template: "https://github.com/lerkolabs/uptop/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
|
||||||
|
commit_author:
|
||||||
|
name: lerkolabs-bot
|
||||||
|
email: bot@lerkolabs.com
|
||||||
|
homepage: https://github.com/lerkolabs/uptop
|
||||||
|
description: Self-hosted uptime monitoring with a TUI over SSH
|
||||||
|
license: MIT
|
||||||
|
install: |
|
||||||
|
bin.install "uptop"
|
||||||
|
test: |
|
||||||
|
system bin/"uptop", "version"
|
||||||
|
|
||||||
# Changelog generation must stay enabled: the --release-notes flag is consumed
|
# Changelog generation must stay enabled: the --release-notes flag is consumed
|
||||||
# by the changelog pipe, so disabling it silently drops the git-cliff notes
|
# by the changelog pipe, so disabling it silently drops the git-cliff notes
|
||||||
# (empty release body on v0.1.0-rc.1). With --release-notes set, GoReleaser
|
# (empty release body on v0.1.0-rc.1). With --release-notes set, GoReleaser
|
||||||
|
|||||||
Reference in New Issue
Block a user