Skip to content

Commit 75a01f2

Browse files
tedim52claude
andcommitted
fix(ci): add GitHub Pages apt/rpm repository alongside Gemfury
Add a GitHub Pages-based apt/rpm repository as an additional publishing target alongside the existing Gemfury publisher. This provides a fallback if the Gemfury token is unavailable. Changes: - Add update-package-repo job to publish workflow using peaceiris/actions-gh-pages - Fix release.ids to include deb-and-rpm-packages so artifacts upload to GitHub Release - Add --fail flag to Fury curl command to surface HTTP errors - Keep existing Gemfury publisher and all Fury-based installation references Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4672313 commit 75a01f2

File tree

2 files changed

+72
-5
lines changed

2 files changed

+72
-5
lines changed

.github/workflows/publish.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,3 +311,73 @@ jobs:
311311
GEMFURY_PUBLISH_TOKEN: ${{ secrets.GEMFURY_PUBLISH_TOKEN }}
312312
KURTOSISBOT_GITHUB_TOKEN: ${{ secrets.KURTOSISBOT_GITHUB_TOKEN }}
313313
run: cli/cli/scripts/build.sh true true
314+
315+
# ============================================================================
316+
# Update apt/rpm Package Repository (GitHub Pages)
317+
# ============================================================================
318+
update-package-repo:
319+
runs-on: ubuntu-latest
320+
needs: push-cli-artifacts
321+
steps:
322+
- name: Install repo tools
323+
run: |
324+
sudo apt-get update
325+
sudo apt-get install -y dpkg-dev createrepo-c
326+
327+
- name: Checkout existing GitHub Pages
328+
uses: actions/checkout@v4
329+
with:
330+
repository: kurtosis-tech/kurtosis-cli-release-artifacts
331+
ref: gh-pages
332+
token: ${{ secrets.KURTOSISBOT_GITHUB_TOKEN }}
333+
path: repo
334+
335+
- name: Download deb/rpm from release
336+
env:
337+
GH_TOKEN: ${{ secrets.KURTOSISBOT_GITHUB_TOKEN }}
338+
run: |
339+
set -euo pipefail
340+
version="${GITHUB_REF_NAME}"
341+
342+
mkdir -p downloads
343+
gh release download "${version}" \
344+
--repo kurtosis-tech/kurtosis-cli-release-artifacts \
345+
--pattern '*.deb' \
346+
--pattern '*.rpm' \
347+
--dir downloads
348+
349+
echo "Downloaded artifacts:"
350+
ls -la downloads/
351+
352+
- name: Update apt repository
353+
run: |
354+
set -euo pipefail
355+
cd repo
356+
357+
# Flat repo layout: debs and Packages file at the root (like Gemfury)
358+
cp ../downloads/*.deb .
359+
360+
# Generate Packages index for all deb files in the root
361+
dpkg-scanpackages --multiversion . > Packages
362+
gzip -9c Packages > Packages.gz
363+
364+
- name: Update rpm repository
365+
run: |
366+
set -euo pipefail
367+
cd repo
368+
369+
mkdir -p rpm/packages
370+
cp ../downloads/*.rpm rpm/packages/
371+
372+
createrepo_c --update rpm/
373+
374+
- name: Deploy to GitHub Pages
375+
uses: peaceiris/actions-gh-pages@v4
376+
with:
377+
personal_token: ${{ secrets.KURTOSISBOT_GITHUB_TOKEN }}
378+
external_repository: kurtosis-tech/kurtosis-cli-release-artifacts
379+
publish_dir: ./repo
380+
keep_files: true
381+
user_name: kurtosisbot
382+
user_email: kurtosisbot@users.noreply.github.com
383+
commit_message: "Update package repo for ${{ github.ref_name }}"

cli/cli/.goreleaser.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ archives:
5252
- scripts/completions/scripts/*
5353
name_template: kurtosis-cli_{{ .Version }}_{{ .Os }}_{{ .Arch }}
5454

55-
# Gemfury accepts deb & rpm packages but not APK, so we build these two separately
5655
nfpms:
5756
- id: deb-and-rpm-packages
5857
package_name: kurtosis-cli
@@ -84,10 +83,10 @@ release:
8483

8584
name_template: "{{ .Version }}"
8685

87-
# NOTE: these are the archive IDs, not the build/binary IDs
8886
ids:
8987
- cli
9088
- cli-linux-packages
89+
- deb-and-rpm-packages
9190

9291
brews:
9392
# creates a brew formula representing the latest version
@@ -141,15 +140,13 @@ brews:
141140
The kurtosis CLI is installed with tab completion support. For more details visit https://docs.kurtosis.com/.
142141
143142
publishers:
144-
# Inspired by https://netdevops.me/2021/building-and-publishing-deb/rpm-packages-with-goreleaser-and-fury.io/
145143
- name: fury.io
146144
ids:
147145
- deb-and-rpm-packages
148146
dir: "{{ dir .ArtifactPath }}"
149147
env:
150-
# This will get set by CI; see the CI config for how
151148
- 'FURY_TOKEN={{ .Env.FURY_TOKEN }}'
152-
cmd: "curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/kurtosis-tech/"
149+
cmd: "curl --fail -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/kurtosis-tech/"
153150

154151
source:
155152
# Kurt Core is a private project, and we definitely don't want to release source code

0 commit comments

Comments
 (0)