Skip to content

ci: vendor aetherpak actions to iterate on flatpak publish without cutting releases#2429

Open
kantord wants to merge 4 commits into
mainfrom
test/aetherpak-flatpak-validation
Open

ci: vendor aetherpak actions to iterate on flatpak publish without cutting releases#2429
kantord wants to merge 4 commits into
mainfrom
test/aetherpak-flatpak-validation

Conversation

@kantord

@kantord kantord commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

Vendors the setup-cli, publish-oci, and publish-site actions from #2301, pinned to a specific source commit, so we can iterate on the flatpak publish + Pages pipeline in follow-up PRs without cutting real ToolHive Studio releases just to test changes here.

Fully or partially written by an AI agent.

kantord and others added 2 commits July 6, 2026 18:18
…afely

Scratch branch, not for merging to main. Vendors publish-oci, publish-site,
and setup-cli locally (MIT-licensed upstream, commits pinned) so the flatpak
publish + Pages pipeline from #2301 can be dry-run tested via
workflow_dispatch without cutting a real release (which would trigger real
auto-updates) and without the production GPG signing secrets.

- setup-cli: adds SHA256 checksum verification of the downloaded CLI binary,
  self-verified against the actual v0.14.0 release assets (upstream has none).
- publish-oci: adds a dry-run mode that skips only the actual `push-oci`
  registry call; everything else (import, coordinate resolution) still runs
  for real.
- Real (non-dry-run) test pushes are isolated via a distinct "test" OCI
  branch (embedded directly in the image tag per pkg/oci/oci.go, cannot
  collide with stable/beta) and a distinct "flatpak-test" Pages subpath
  (isolated from the real "flatpak" path and "latest/" release manifest via
  destination_dir, verified against peaceiris/actions-gh-pages source).

Delete this branch and file findings upstream once validation is done.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Builds the CLI from source (checked out at commit
e9388a1d41021dcf0ac75feb0a2e50dba87ca81c, matching the v0.14.0 tag) instead
of downloading the pre-built release binary. Pinning to an exact commit
keeps this test build fully reproducible while we iterate on the pipeline,
regardless of anything changing upstream in the meantime.

Verified this is a straightforward build: scanned all 68 .go files at this
commit, no cgo; dependencies are mainstream (go-containerregistry, cobra,
ProtonMail/go-crypto) and already checksum-pinned via the upstream go.sum.
Build command mirrors aetherpak/cli's own `make release/build` target, with
a step confirming the checkout landed on the expected commit before
building.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size/L label Jul 6, 2026
@kantord kantord changed the title test: temp-vendor aetherpak actions to validate flatpak build (not for merge) test: temp-vendor aetherpak actions to validate flatpak build Jul 6, 2026
@kantord
kantord marked this pull request as ready for review July 6, 2026 17:09
Copilot AI review requested due to automatic review settings July 6, 2026 17:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a manual, scratch GitHub Actions workflow plus temporarily vendored AetherPak composite actions to validate the Flatpak publish + GitHub Pages pipeline in a reproducible way without cutting a real release.

Changes:

  • Adds a workflow_dispatch-only “[TEMP] Test AetherPak Flatpak Publish” workflow that reuses an existing Flatpak bundle artifact from a prior workflow run.
  • Vendors AetherPak setup-cli, publish-oci, and publish-site actions into .github/actions/_tmp-* for pinned, reproducible iteration.
  • Introduces a dry-run mode for the vendored publish-oci action to avoid mutating GHCR / Pages during validation runs.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
.github/workflows/_tmp-test-aetherpak-publish.yml Adds a manual-only workflow to test pushing Flatpak OCI + building/deploying a site under an isolated subpath.
.github/actions/_tmp-aetherpak-setup-cli/action.yml Vendored setup action that builds the AetherPak CLI from a pinned source commit.
.github/actions/_tmp-aetherpak-publish-site/action.yml Vendored site-generation action that builds the static repo index (and optionally uploads a Pages artifact).
.github/actions/_tmp-aetherpak-publish-oci/action.yml Vendored OCI-publish action with a dry-run mode for validation without pushing images.

Comment thread .github/workflows/_tmp-test-aetherpak-publish.yml
Comment thread .github/actions/_tmp-aetherpak-publish-site/action.yml
Comment thread .github/actions/_tmp-aetherpak-publish-oci/action.yml
Comment thread .github/actions/_tmp-aetherpak-publish-oci/action.yml
Comment thread .github/actions/_tmp-aetherpak-publish-oci/action.yml
Three confirmed issues from review:
- Scratch workflow needed contents: write, not read -- peaceiris/actions-gh-pages
  pushes a commit to gh-pages, which read-only permissions can't do.
- publish-site's actions/upload-pages-artifact was referenced by tag; pinned
  to its commit SHA to match this repo's convention elsewhere.
- publish-oci's registry-token input defaulted to the literal expression
  `${{ github.token }}`, which action.yml input defaults don't evaluate (only
  outputs.*.value does, confirmed against GitHub's docs) -- a caller omitting
  registry-token would get that literal string instead of a real token. This
  exists upstream too. Fixed by defaulting to empty and falling back via
  `inputs.registry-token || github.token` in the step's env mapping instead.

One review comment (bundle-path glob forwarded as a literal string) turned
out not to apply here: aetherpak's `import` command does call filepath.Glob
internally, and this repo's flatpak maker output is exactly one directory
level deep, which matches the `**` pattern's segment count -- verified by
reading cmd/import.go and this repo's MakerFlatpakBuilder rather than taking
the suggestion at face value.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@@ -0,0 +1,285 @@
# ============================================================================
# TEMPORARY VENDORED COPY — DO NOT MERGE TO main

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand do you wan to merge this pr on main 🤔 ?

- name: Push Flatpak OCI to GHCR (test channel, unsigned, dry-run capable)
uses: ./.github/actions/_tmp-aetherpak-publish-oci
with:
bundle-path: _bundles/**/*.flatpak

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This glob will never match, so the first run should fail at the "Import bundle" step.

The chain:

  1. pr-build-test.yml uploads with path: out/make/**/*.flatpak. upload-artifact preserves the directory structure after the first wildcard, so the artifact contains flatpak/<arch>/<name>.flatpak.
  2. Downloaded into _bundles, the file lands at _bundles/flatpak/<arch>/<name>.flatpakthree levels below _bundles.
  3. The action passes the pattern through to aetherpak import --bundle-path, which resolves it with Go's filepath.Glob (cmd/import.go at the pinned commit). Go's glob has no globstar: ** behaves like * and matches a single path component, so _bundles/**/*.flatpak only matches files exactly two levels deep.
  4. Zero matches → cmd/import.go falls back to the literal pattern as a path → import fails on a nonexistent file.

Most robust fix is to resolve the path in the workflow instead of relying on the CLI's glob:

- name: Resolve bundle path
  id: bundle
  run: echo "path=$(find _bundles -type f -name '*.flatpak' | head -1)" >> "$GITHUB_OUTPUT"

then bundle-path: ${{ steps.bundle.outputs.path }}. (Alternatively _bundles/*/*/*.flatpak matches the current artifact layout, but it's brittle if the upload path changes.)

…ring plan

These files are meant to be merged, not left as pure throwaway scratch code
-- the point is to decouple the flatpak publish + Pages pipeline from tagged
releases so it can be iterated on without cutting real ToolHive Studio
releases (which trigger real auto-updates and binary signing) just to test
changes here. The old banners said the opposite and confused reviewers.

Also trimmed the internal contingency language (upstreaming vs. staying
vendored long-term) -- that's our own planning, not something that needs to
live in a public repo file.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@kantord kantord changed the title test: temp-vendor aetherpak actions to validate flatpak build ci: vendor aetherpak actions to iterate on flatpak publish without cutting releases Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants