Skip to content

ci: build flatpak from a commit instead of a branch name - #889

Merged
dynobo merged 1 commit into
mainfrom
ci/flatpak-build-by-commit
Oct 20, 2026
Merged

dynobo merged 1 commit into
mainfrom
ci/flatpak-build-by-commit

Conversation

@dynobo

@dynobo dynobo commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

test-flatpak → "Run build script" fails for every PR whose head branch does not live in
dynobo/normcap (Weblate, Dependabot, external contributors):

git clone --branch weblate-normcap-ui https://github.com/dynobo/normcap.git
  fatal: Remote branch weblate-normcap-ui not found in upstream origin

@dynobo
dynobo force-pushed the ci/flatpak-build-by-commit branch from 9550d73 to 1821d95 Compare October 20, 2026 20:56
PRs from forks have head branches that don't exist in dynobo/normcap, so
`update.py --bundle <branch>` failed with "Remote branch not found", and
the GitHub API lookup in the build script returned 422 for such names.

Pass a commit instead: `github.sha` is the PR merge commit (the tree the
other jobs test), the pushed commit for pushes and the tag's commit for
tags. Only `workflow_dispatch` still builds the given ref, which now also
accepts SHAs. Branch names from PRs in this repo still work, but the
manifest is now pinned to an exact commit, making the build reproducible.

Also drop the write-only REPO/BRANCH env block of the clone step.

Requires the flathub repo's update.py to support SHA sources:
flathub/com.github.dynobo.normcap#141
@dynobo
dynobo force-pushed the ci/flatpak-build-by-commit branch from 1821d95 to 90f0688 Compare October 20, 2026 21:01
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 80.915%. remained the same — ci/flatpak-build-by-commit into main

@dynobo
dynobo merged commit 38c130e into main Oct 20, 2026
44 of 46 checks passed
@dynobo
dynobo deleted the ci/flatpak-build-by-commit branch October 20, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants