Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/flatpak-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,34 @@ jobs:
cache-key: flatpak-builder-${{ github.sha }}-no-cache-restored
verbose: true

flatpak-builder-dedicated-path-params:
name: Flatpak Builder with Dedicated Path Params
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
options: --privileged
volumes:
- /mnt/flatpak_workflow:/mnt/flatpak_workflow
steps:
- uses: actions/checkout@v4
- uses: ./flatpak-builder
with:
manifest-path: ./flatpak-builder/tests/test-project/org.example.MyApp.yaml
build-dir: /mnt/flatpak_workflow/build-dir
repo-dir: /mnt/flatpak_workflow/repo
state-dir: /mnt/flatpak_workflow/.flatpak-builder
verbose: true
- name: Verify created directories
shell: bash
run: |
for d in \
/mnt/flatpak_workflow/build-dir \
/mnt/flatpak_workflow/repo \
/mnt/flatpak_workflow/.flatpak-builder
do
[ -d "$d" ] || { echo "::error::Directory $d does not exist"; exit 1; }
done

tests:
name: Tests
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,15 @@ 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 | - |
| `build-dir` | The directory to build the application in. | Optional | `flatpak_app` |
| `repo-dir` | The directory of the flatpak repository. | Optional | `repo` |
| `state-dir` | The directory to store the build state/cache in. | Optional | `.flatpak-builder` |
| `verbose` | Enable verbosity | Optional | `false` |
| `upload-artifact` | Whether to upload the resulting bundle or not as an artifact | Optional | `true` |

**Note**: `repo-dir` and `state-dir` must be under the same partition.


#### Building for multiple CPU architectures

To build for CPU architectures other than `x86_64`, the GitHub Actions workflow has to either natively be running on that architecture (e.g. on an `aarch64` self-hosted GitHub Actions runner), or the container used must be configured to emulate the requested architecture (e.g. with QEMU).
Expand Down
12 changes: 12 additions & 0 deletions flatpak-builder/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ inputs:
description: >
The key to sign the package.
required: false
build-dir:
description: >
The directory to build the application in.
required: false
repo-dir:
description: >
The name of the flatpak repository.
required: false
state-dir:
description: >
The directory to store the build state/cache in.
required: false
verbose:
description: >
"Enable verbosity"
Expand Down
Loading