Skip to content

Commit 057490e

Browse files
committed
keepBuildDirs flag
1 parent 6684584 commit 057490e

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
| `arch` | Specifies the CPU architecture to build for | Optional | `x86_64` |
5757
| `mirror-screenshots-url` | Specifies the URL to mirror screenshots | Optional | - |
5858
| `gpg-sign` | The key to sign the package | Optional | - |
59+
| `keep-build-dirs` | Keep build directories after the build finishes (passes `--keep-build-dirs` to flatpak-builder). Useful for debugging intermediate files. | Optional | `false` |
5960
| `verbose` | Enable verbosity | Optional | `false` |
6061
| `upload-artifact` | Whether to upload the resulting bundle or not as an artifact | Optional | `true` |
6162

flatpak-builder/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ inputs:
5656
Defines the cache-key to use.
5757
Defaults to flatpak-builder-${arch}-${sha256(manifestPath)}
5858
required: false
59+
keep-build-dirs:
60+
description: >
61+
Keep build directories after the build finishes, passing `--keep-build-dirs` flag
62+
to flatpak-builder.
63+
Possible values: true, enabled, yes, y. Defaults to false.
64+
required: false
65+
default: "false"
5966
branch:
6067
description: The flatpak branch.
6168
default: "master"

flatpak-builder/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ class Configuration {
4545
this.mirrorScreenshotsUrl = core.getInput('mirror-screenshots-url')
4646
// The key to sign the package
4747
this.gpgSign = core.getInput('gpg-sign')
48+
// Keep build directories after the build (pass --keep-build-dirs)
49+
this.keepBuildDirs = core.getBooleanInput('keep-build-dirs')
4850
// Modified manifest path
4951
this.modifiedManifestPath = path.join(
5052
path.dirname(this.manifestPath),
@@ -226,6 +228,9 @@ const build = async (manifest, manifestPath, cacheHitKey, config) => {
226228
`--default-branch=${branch}`,
227229
`--arch=${config.arch}`
228230
]
231+
if (config.keepBuildDirs) {
232+
args.push('--keep-build-dirs')
233+
}
229234
if (config.cacheBuildDir) {
230235
args.push('--ccache')
231236
}

0 commit comments

Comments
 (0)