Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flatpak-builder: add configuration option for local repository path #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

twelho
Copy link

@twelho twelho commented Jun 6, 2023

Enables the user to configure the local repository path/name for flatpak-builder instead of hard-coding it as repo. This is useful actions workflows that directly export artifacts into a separate, local repository, see for example here. I've renamed localRepoName to localRepoPath in flat-manager as well for consistency and since it should be a real filesystem path, but don't have enough context on how to best solve the FIXME in there.

@@ -9,7 +9,7 @@ class Configuration {
this.endOfLife = core.getInput('end-of-life')
this.endOfLifeRebase = core.getInput('end-of-life-rebase')
// FIXME: get this from the outputs of the flatpak-builder action
this.localRepoName = 'repo'
this.localRepoPath = 'repo'
Copy link
Member

Choose a reason for hiding this comment

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

you probably want

Suggested change
this.localRepoPath = 'repo'
this.localRepoPath = core.getInput('local-repository') || 'repo'

Copy link
Member

Choose a reason for hiding this comment

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

I would also check if the path exists and is a directory otherwise error out early

@@ -56,6 +56,7 @@ jobs:
| `arch` | Specifies the CPU architecture to build for | Optional | `x86_64` |
| `mirror-screenshots-url` | Specifies the URL to mirror screenshots | Optional | - |
| `gpg-sign` | The key to sign the package | Optional | - |
| `local-repository` | The path to the local OSTree repository used to export the built artifacts to and build the bundle from. If the path exists, it must point to a valid OSTree repository, otherwise a new repository will be created. | Optional | `repo` |
Copy link
Member

Choose a reason for hiding this comment

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

Please add the same for flat-manager + update the action.yml of flat-manager as well.

@@ -9,7 +9,7 @@ class Configuration {
this.endOfLife = core.getInput('end-of-life')
this.endOfLifeRebase = core.getInput('end-of-life-rebase')
// FIXME: get this from the outputs of the flatpak-builder action
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind also looking at the fixme above? =)

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