Repository navigation
Feature: Build flatpak on CI - #4199
Conversation
* additionally, remove maven-dependencies
not available in flathub container
remove yq edits and simply override build yaml
and keep build dirs
* add boolean dispatch input to create pr manually * remove tarball job * adjust template build script to final build file * change PR description * fix slack webhook
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughRemoved the previous Flathub release workflow Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pom.xml (1)
529-593:⚠️ Potential issue | 🔴 CriticalBreaking change: Workflows still reference the removed
-Plinuxprofile.The
linuxprofile has been removed and replaced with architecture-specific profiles (linux-aarch64andlinux-x86_64), but two workflows still invoke the old profile, which will cause build failures:
.github/workflows/debian.yml:72.github/workflows/appimage.yml:90Update both workflows to use the appropriate new profile IDs.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pom.xml` around lines 529 - 593, Workflows still invoke the removed Maven profile "-Plinux"; locate any workflow job steps that pass "-Plinux" and replace them with the new architecture-specific profiles: use "-Plinux-x86_64" for amd64/amd_64 targets and "-Plinux-aarch64" for aarch64 targets so they match the pom profiles linux-x86_64 and linux-aarch64.
🧹 Nitpick comments (4)
pom.xml (1)
537-540: Clarify profile activation:idea.versionproperty vs explicit-Pflag.Both profiles have
<property><name>idea.version</name></property>in their activation conditions, which is typically used to detect IntelliJ IDEA environments. When invoking Maven with an explicit-Pflag (e.g.,-Plinux-x86_64), the profile activates regardless of these conditions, so the Flatpak build should work correctly.However, for clarity and to avoid confusion, consider whether the
idea.versionactivation condition is actually needed for these profiles. If the profiles are only activated via explicit-Pflags in CI, the property check may be unnecessary and could be removed to simplify the configuration.Also applies to: 582-584
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pom.xml` around lines 537 - 540, The profile activation currently includes an activation block with a <property><name>idea.version</name></property> check which is redundant if these profiles are always invoked explicitly with -P (for example -Plinux-x86_64); remove the <property> activation condition from the profile activation (or alternatively replace it with a clearer comment) so the profile relies solely on explicit -P activation, updating the activation blocks that contain idea.version (the <property> with name "idea.version") to avoid accidental IntelliJ-based activation..github/workflows/linux-flatpak.yml (3)
156-156: TODO comment: Update submodule.This TODO indicates pending work for updating the submodule reference. Should this be tracked as a follow-up task?
Would you like me to open an issue to track this TODO?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/linux-flatpak.yml at line 156, The TODO comment next to the GitHub Actions key "submodules: true" is a lingering note; either update the submodule reference now or convert the TODO into a tracked task. Fix by either (A) actually updating the submodule and removing the comment, or (B) create a tracker (issue/PR) for updating the submodule and replace the inline TODO with a short comment containing the issue/PR number or URL; locate the YAML key "submodules" in the workflow and apply one of these two changes so the TODO is not left in the file.
142-143: Consider adding an error message whencmpfails.The
cmp --silentcommand will exit with a non-zero status if files differ, causing the job to fail. Adding an explicit error message would improve debuggability when architecture-independent dependencies unexpectedly differ.♻️ Suggested improvement
- name: Verify arch independent maven dependencies - run: cmp --silent mvn-src-aarch64/maven-dependencies.yaml mvn-src-x64/maven-dependencies.yaml + run: | + if ! cmp --silent mvn-src-aarch64/maven-dependencies.yaml mvn-src-x64/maven-dependencies.yaml; then + echo "::error::Architecture-independent Maven dependencies differ between aarch64 and x86_64 builds" + diff mvn-src-aarch64/maven-dependencies.yaml mvn-src-x64/maven-dependencies.yaml || true + exit 1 + fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/linux-flatpak.yml around lines 142 - 143, The workflow step "Verify arch independent maven dependencies" currently runs cmp --silent mvn-src-aarch64/maven-dependencies.yaml mvn-src-x64/maven-dependencies.yaml and will fail silently with no context; change the step command to run cmp and on failure print a clear error including the two file paths and optionally show a diff (e.g., use cmp ... || { echo "ERROR: maven-dependencies differ between mvn-src-aarch64 and mvn-src-x64"; diff -u mvn-src-aarch64/maven-dependencies.yaml mvn-src-x64/maven-dependencies.yaml || true; exit 1; }) so the job still fails but provides useful diagnostics.
60-60: HardcodedFLATPAK_REVISION: 1may need updates for re-releases.If a Flatpak needs to be re-published for the same version (e.g., to fix packaging issues), the revision number would need to be incremented. Consider whether this should be configurable via workflow input for manual dispatches.
Also applies to: 190-190
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/linux-flatpak.yml at line 60, The workflow currently hardcodes FLATPAK_REVISION: 1; make it configurable by adding a workflow_dispatch input (e.g., "flatpak_revision" with default "1") and replace the hardcoded FLATPAK_REVISION occurrences with the input reference (use ${{ inputs.flatpak_revision }}), updating both places referenced in the file so manual dispatches can bump the revision without editing the workflow.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/linux-flatpak.yml:
- Line 221: Fix the typo in the SLACK_MESSAGE environment value by removing the
extra ">" so the message reads "See <${{ steps.create-pr.outputs.FLATHUB_PR_URL
}}|PR> on how to proceed." — update the SLACK_MESSAGE assignment (the
SLACK_MESSAGE key and the use of steps.create-pr.outputs.FLATHUB_PR_URL) to
remove the stray character.
- Around line 61-64: The CRYPTOMATOR_SOURCE heredoc contains inconsistent
indentation causing malformed YAML: ensure all keys inside the heredoc (type,
path, commit) align with the same indentation level (same number of leading
spaces) so the resulting sources list is a valid mapping; update both
CRYPTOMATOR_SOURCE and the other similar heredoc (with sha512 and url) to remove
the extra 8 spaces before path/commit/sha512/url so that type, path,
commit/sha512/url all start at the same column after the list item, keeping
envsubst usage unchanged.
---
Outside diff comments:
In `@pom.xml`:
- Around line 529-593: Workflows still invoke the removed Maven profile
"-Plinux"; locate any workflow job steps that pass "-Plinux" and replace them
with the new architecture-specific profiles: use "-Plinux-x86_64" for
amd64/amd_64 targets and "-Plinux-aarch64" for aarch64 targets so they match the
pom profiles linux-x86_64 and linux-aarch64.
---
Nitpick comments:
In @.github/workflows/linux-flatpak.yml:
- Line 156: The TODO comment next to the GitHub Actions key "submodules: true"
is a lingering note; either update the submodule reference now or convert the
TODO into a tracked task. Fix by either (A) actually updating the submodule and
removing the comment, or (B) create a tracker (issue/PR) for updating the
submodule and replace the inline TODO with a short comment containing the
issue/PR number or URL; locate the YAML key "submodules" in the workflow and
apply one of these two changes so the TODO is not left in the file.
- Around line 142-143: The workflow step "Verify arch independent maven
dependencies" currently runs cmp --silent
mvn-src-aarch64/maven-dependencies.yaml mvn-src-x64/maven-dependencies.yaml and
will fail silently with no context; change the step command to run cmp and on
failure print a clear error including the two file paths and optionally show a
diff (e.g., use cmp ... || { echo "ERROR: maven-dependencies differ between
mvn-src-aarch64 and mvn-src-x64"; diff -u
mvn-src-aarch64/maven-dependencies.yaml mvn-src-x64/maven-dependencies.yaml ||
true; exit 1; }) so the job still fails but provides useful diagnostics.
- Line 60: The workflow currently hardcodes FLATPAK_REVISION: 1; make it
configurable by adding a workflow_dispatch input (e.g., "flatpak_revision" with
default "1") and replace the hardcoded FLATPAK_REVISION occurrences with the
input reference (use ${{ inputs.flatpak_revision }}), updating both places
referenced in the file so manual dispatches can bump the revision without
editing the workflow.
In `@pom.xml`:
- Around line 537-540: The profile activation currently includes an activation
block with a <property><name>idea.version</name></property> check which is
redundant if these profiles are always invoked explicitly with -P (for example
-Plinux-x86_64); remove the <property> activation condition from the profile
activation (or alternatively replace it with a clearer comment) so the profile
relies solely on explicit -P activation, updating the activation blocks that
contain idea.version (the <property> with name "idea.version") to avoid
accidental IntelliJ-based activation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 580e6539-2a83-4182-baf5-9807293dbc52
⛔ Files ignored due to path filters (2)
dist/linux/flatpak/build-aux/fusermount-wrapper.shis excluded by!**/dist/**dist/linux/flatpak/org.cryptomator.Cryptomator.TEMPLATE.yamlis excluded by!**/dist/**
📒 Files selected for processing (3)
.github/workflows/flathub.yml.github/workflows/linux-flatpak.ymlpom.xml
💤 Files with no reviewable changes (1)
- .github/workflows/flathub.yml
There was a problem hiding this comment.
🧹 Nitpick comments (4)
.github/workflows/linux-flatpak.yml (4)
58-60: FLATPAK_REVISION is hardcoded in two places.
FLATPAK_REVISIONis set to1in both thebuild-flatpakjob (line 60) and thecreate-prjob (line 190). If revision bumps are needed for Flathub releases (e.g., for packaging-only fixes), this value would need to be updated in both locations. Consider extracting it to a workflow-level env variable or a workflow input with a default.♻️ Proposed consolidation
Add at the workflow level:
env: FLATPAK_REVISION: '1'Then reference
${{ env.FLATPAK_REVISION }}in both jobs.Also applies to: 188-190
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/linux-flatpak.yml around lines 58 - 60, The FLATPAK_REVISION value is hardcoded in both the build-flatpak and create-pr jobs so extract it to a single workflow-level variable (either under top-level env or as a workflow input with a default) named FLATPAK_REVISION and then update both job usages to reference it via ${ env.FLATPAK_REVISION } (or the appropriate input expression) instead of the literal "1"; update any occurrences (e.g., where FLATPAK_REVISION is currently set in the build-flatpak and create-pr jobs) to use the consolidated variable.
149-149: Consider adding explicit parentheses for condition clarity.The
ifcondition combines multiple operators. While the logic is correct due to operator precedence (&&before||), explicit parentheses would improve readability.♻️ Suggested improvement
- if: github.event_name == 'workflow_dispatch' && inputs.create-pr || github.event_name == 'release' && needs.get-version.outputs.versionType == 'stable' + if: (github.event_name == 'workflow_dispatch' && inputs.create-pr) || (github.event_name == 'release' && needs.get-version.outputs.versionType == 'stable')🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/linux-flatpak.yml at line 149, The conditional on the workflow step using the expression "github.event_name == 'workflow_dispatch' && inputs.create-pr || github.event_name == 'release' && needs.get-version.outputs.versionType == 'stable'" is ambiguous to readers; add explicit parentheses to show grouping (e.g., wrap the first conjunction and the second conjunction) so the intent is clear. Locate the `if` expression in the GitHub Actions workflow (the line containing `if: github.event_name == 'workflow_dispatch' && inputs.create-pr || github.event_name == 'release' && needs.get-version.outputs.versionType == 'stable'`) and update it to use parentheses around each AND group to make the precedence explicit. Ensure the final logic remains identical: (github.event_name == 'workflow_dispatch' && inputs.create-pr) || (github.event_name == 'release' && needs.get-version.outputs.versionType == 'stable').
142-143: Consider adding diagnostic output when dependency verification fails.Using
cmp --silentwill fail silently without showing which lines differ, making it hard to debug when arch-independent dependencies don't match. Consider outputting a diff on failure.♻️ Proposed improvement for better diagnostics
- name: Verify arch independent maven dependencies - run: cmp --silent mvn-src-aarch64/maven-dependencies.yaml mvn-src-x64/maven-dependencies.yaml + run: | + if ! cmp --silent mvn-src-aarch64/maven-dependencies.yaml mvn-src-x64/maven-dependencies.yaml; then + echo "::error::Arch-independent maven dependencies differ between aarch64 and x86_64 builds" + diff mvn-src-aarch64/maven-dependencies.yaml mvn-src-x64/maven-dependencies.yaml || true + exit 1 + fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/linux-flatpak.yml around lines 142 - 143, The current step "Verify arch independent maven dependencies" uses `cmp --silent` which hides differences; change the step to run `cmp` and, on failure, emit a readable diff of the two files (mvn-src-aarch64/maven-dependencies.yaml and mvn-src-x64/maven-dependencies.yaml) and exit non‑zero so CI still fails but shows diagnostics; implement this by running `cmp` and if it reports differences invoke `diff` (or `git --no-pager diff --no-index --unified`) against those two file paths to print the differing lines before exiting with an error.
154-157: Address or track the TODO for submodule update.The TODO comment indicates the submodule update step is incomplete. This could lead to the Flathub PR being created with an outdated submodule reference.
Would you like me to open an issue to track this task, or do you have plans to address it in this PR?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/linux-flatpak.yml around lines 154 - 157, The workflow currently leaves a TODO at the submodule step (submodules: true) which may push an outdated submodule ref; update the workflow to either (A) add a pre-PR step that updates the submodule to the desired tip (e.g., run git submodule update --init --remote --merge or fetch the specific submodule upstream and git add/commit/push the new ref before creating the Flathub PR) referencing the existing "submodules: true" setting, or (B) remove the TODO and create/link a tracked issue for updating the flathub/org.cryptomator.Cryptomator submodule so future PRs address it; implement one of these choices and ensure the action that creates the PR uses the updated submodule ref.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/linux-flatpak.yml:
- Around line 58-60: The FLATPAK_REVISION value is hardcoded in both the
build-flatpak and create-pr jobs so extract it to a single workflow-level
variable (either under top-level env or as a workflow input with a default)
named FLATPAK_REVISION and then update both job usages to reference it via ${
env.FLATPAK_REVISION } (or the appropriate input expression) instead of the
literal "1"; update any occurrences (e.g., where FLATPAK_REVISION is currently
set in the build-flatpak and create-pr jobs) to use the consolidated variable.
- Line 149: The conditional on the workflow step using the expression
"github.event_name == 'workflow_dispatch' && inputs.create-pr ||
github.event_name == 'release' && needs.get-version.outputs.versionType ==
'stable'" is ambiguous to readers; add explicit parentheses to show grouping
(e.g., wrap the first conjunction and the second conjunction) so the intent is
clear. Locate the `if` expression in the GitHub Actions workflow (the line
containing `if: github.event_name == 'workflow_dispatch' && inputs.create-pr ||
github.event_name == 'release' && needs.get-version.outputs.versionType ==
'stable'`) and update it to use parentheses around each AND group to make the
precedence explicit. Ensure the final logic remains identical:
(github.event_name == 'workflow_dispatch' && inputs.create-pr) ||
(github.event_name == 'release' && needs.get-version.outputs.versionType ==
'stable').
- Around line 142-143: The current step "Verify arch independent maven
dependencies" uses `cmp --silent` which hides differences; change the step to
run `cmp` and, on failure, emit a readable diff of the two files
(mvn-src-aarch64/maven-dependencies.yaml and
mvn-src-x64/maven-dependencies.yaml) and exit non‑zero so CI still fails but
shows diagnostics; implement this by running `cmp` and if it reports differences
invoke `diff` (or `git --no-pager diff --no-index --unified`) against those two
file paths to print the differing lines before exiting with an error.
- Around line 154-157: The workflow currently leaves a TODO at the submodule
step (submodules: true) which may push an outdated submodule ref; update the
workflow to either (A) add a pre-PR step that updates the submodule to the
desired tip (e.g., run git submodule update --init --remote --merge or fetch the
specific submodule upstream and git add/commit/push the new ref before creating
the Flathub PR) referencing the existing "submodules: true" setting, or (B)
remove the TODO and create/link a tracked issue for updating the
flathub/org.cryptomator.Cryptomator submodule so future PRs address it;
implement one of these choices and ensure the action that creates the PR uses
the updated submodule ref.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6ea8c13e-a7cd-41ac-bef8-cb88b2d3d278
📒 Files selected for processing (1)
.github/workflows/linux-flatpak.yml
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/linux-flatpak.yml:
- Around line 186-192: The code mixes NEXT_REVISION and NEXT_REL and also uses
CURRENT_REL instead of CURRENT_REVISION, causing the output to be empty; update
the conditional to consistently use one variable (e.g., NEXT_REVISION): in the
if branch compute NEXT_REVISION=$((CURRENT_REVISION + 1)) (fix CURRENT_REL ->
CURRENT_REVISION), in the else branch set NEXT_REVISION=1, and echo
"value=${NEXT_REVISION}" so steps.revision.outputs.value is always populated.
- Around line 51-64: The checkout and Flatpak source are not honoring a manual
workflow_dispatch.tag input: add an explicit ref to the cryptomator checkouts
(use the dispatch tag when present, e.g. reference the workflow input or
fallback to github.sha) so the copied dist/linux/flatpak/* and the
CRYPTOMATOR_SOURCE git commit match the requested tag instead of always using
github.sha; update the CRYPTOMATOR_SOURCE commit value to reference that same
resolved ref variable instead of hardcoding ${{ github.sha }}. Also fix the
"Determine revision" variable-name bug by normalizing the names (use either
CURRENT_REVISION / NEXT_REVISION or CURRENT_REL / NEXT_REL consistently) so
references on lines currently using $CURRENT_REL and $NEXT_REL match the
variables that are set and the outputs use the same names.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1ee8a0e4-84e5-452e-898f-0e5be56a0e4a
📒 Files selected for processing (1)
.github/workflows/linux-flatpak.yml
There was a problem hiding this comment.
♻️ Duplicate comments (1)
.github/workflows/linux-flatpak.yml (1)
192-204:⚠️ Potential issue | 🟠 MajorIncrement
CURRENT_REVISION, notCURRENT_REL.
CURRENT_RELis never assigned in this step, so the matching-version branch cannot bump the existing revision correctly. It should reuse the value read intoCURRENT_REVISIONon Line 196.🔧 Suggested fix
if [[ "$CURRENT_VERSION" == "$TARGET_VERSION" && "$CURRENT_REVISION" =~ ^[0-9]+$ ]]; then - NEXT_REVISION=$((CURRENT_REL + 1)) + NEXT_REVISION=$((CURRENT_REVISION + 1)) else NEXT_REVISION=1 fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/linux-flatpak.yml around lines 192 - 204, The branch that increments the existing revision uses an undefined variable CURRENT_REL; replace that with the parsed CURRENT_REVISION so the matching-version branch correctly bumps the revision (i.e., when computing NEXT_REVISION use CURRENT_REVISION for the arithmetic), keeping the numeric check on CURRENT_REVISION (the regex) and the surrounding logic in the "Determine revision" step unchanged.
🧹 Nitpick comments (1)
.github/workflows/linux-flatpak.yml (1)
16-23: Includepom.xmlin the push filter.This workflow derives
maven-dependencies*.yamlfrom the Maven graph, so dependency/profile edits can change the generated manifests without retriggering the push job. Adding at least the rootpom.xmlhere would keep that CI coverage intact.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/linux-flatpak.yml around lines 16 - 23, The push job's paths filter in .github/workflows/linux-flatpak.yml currently lists only workflow and dist paths, so changes to the Maven root POM won't retrigger it; update the push.paths array to include the repository's root pom.xml (add 'pom.xml' alongside the existing entries) so edits to Maven dependencies/profiles regenerate maven-dependencies*.yaml and retrigger the workflow.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/linux-flatpak.yml:
- Around line 192-204: The branch that increments the existing revision uses an
undefined variable CURRENT_REL; replace that with the parsed CURRENT_REVISION so
the matching-version branch correctly bumps the revision (i.e., when computing
NEXT_REVISION use CURRENT_REVISION for the arithmetic), keeping the numeric
check on CURRENT_REVISION (the regex) and the surrounding logic in the
"Determine revision" step unchanged.
---
Nitpick comments:
In @.github/workflows/linux-flatpak.yml:
- Around line 16-23: The push job's paths filter in
.github/workflows/linux-flatpak.yml currently lists only workflow and dist
paths, so changes to the Maven root POM won't retrigger it; update the
push.paths array to include the repository's root pom.xml (add 'pom.xml'
alongside the existing entries) so edits to Maven dependencies/profiles
regenerate maven-dependencies*.yaml and retrigger the workflow.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 42b3c716-735e-4619-8bb2-64dbf4d58994
📒 Files selected for processing (1)
.github/workflows/linux-flatpak.yml
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/linux-flatpak.yml (1)
85-85: Cache key may not align with the actual source commit.When triggered via
workflow_dispatchwith ataginput,github.sharefers to the branch tip that triggered the workflow, not the tag's commit SHA. The build itself usessteps.cryptomator-source.outputs.sha(the resolved tag commit). This mismatch means cache hits/misses won't correlate with the actual source being built.Consider using the resolved commit SHA for consistent caching:
- cache-key: flatpak-builder-${{ github.sha }} + cache-key: flatpak-builder-${{ steps.cryptomator-source.outputs.sha }}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/linux-flatpak.yml at line 85, Cache key uses github.sha which can differ from the resolved tag commit when the workflow is run via workflow_dispatch with a tag; change the cache-key to use the actual resolved commit SHA from the step output (steps.cryptomator-source.outputs.sha) so cache reflects the built source, ensure the caching step runs after the step that sets cryptomator-source.outputs.sha, and add a fallback to github.sha if that output is empty (e.g., cache-key: flatpak-builder-${{ steps.cryptomator-source.outputs.sha || github.sha }}).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/linux-flatpak.yml:
- Line 85: Cache key uses github.sha which can differ from the resolved tag
commit when the workflow is run via workflow_dispatch with a tag; change the
cache-key to use the actual resolved commit SHA from the step output
(steps.cryptomator-source.outputs.sha) so cache reflects the built source,
ensure the caching step runs after the step that sets
cryptomator-source.outputs.sha, and add a fallback to github.sha if that output
is empty (e.g., cache-key: flatpak-builder-${{
steps.cryptomator-source.outputs.sha || github.sha }}).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: dec01a2d-8883-415d-b2cb-f9544edc8cf4
📒 Files selected for processing (1)
.github/workflows/linux-flatpak.yml
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/linux-flatpak.yml:
- Around line 53-56: The checkout uses a moving ref (ref: ${{ inputs.tag ||
github.ref_name }}) which can re-resolve to a different commit; change both
checkouts to pin to the event commit by replacing github.ref_name with
github.sha (e.g. ref: ${{ inputs.tag || github.sha }}), updating the checkout
steps that include "uses: actions/checkout" and "with: path: cryptomator, ref:
..." (and the analogous block later in the file).
- Around line 159-163: The current job condition and TARBALL_URL allow a
workflow_dispatch with create-pr on a branch to proceed while TARBALL_URL always
points at a tag tarball; fix by preventing branch-based manual runs or by
deriving the tarball from the resolved ref. Either (A) tighten the job if (the
same `if:` shell expression) to require the ref be a tag (e.g. require
github.ref startsWith 'refs/tags/' or github.ref_name corresponds to a tag) when
create-pr is true, or (B) compute TARBALL_URL from the resolved ref (use
github.ref_name / github.ref when it is a tag and fall back to
github.event.release.tag_name) so `TARBALL_URL` matches the actual checked-out
ref; update both occurrences of TARBALL_URL and the `if:` condition accordingly.
- Around line 16-23: The workflow's push path filter omits files that can change
the produced artifacts; update the push.paths block (under the push trigger) to
include '.github/workflows/get-version.yml' and 'pom.xml' so changes to the
reusable version workflow or Maven project metadata will retrigger this Flatpak
CI run; modify the push.paths array in the .github/workflows/linux-flatpak.yml
file to add those two entries.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e0a9f37c-aea2-489f-8623-a5a555dc17d0
📒 Files selected for processing (1)
.github/workflows/linux-flatpak.yml
additionally, check tag if a PR should be created
|
Note Unit test generation is a public access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
|
✅ Unit tests committed locally. Commit: |
fa8cc8b to
b82c73f
Compare
1e46a80 to
db31fca
Compare
This PR adds a worfklow to build a flatpak in the CI.
It uses the flatpak building action provided by flatpak. The workflow replaces the create-flathub-pr workflow.