Use unique flatpak branch to allow parallel installation

Need to fetch some commit history and tags so that git describe works.
This commit is contained in:
Gunter Labes 2024-03-19 19:26:29 +01:00 committed by GitHub
parent e5c741a296
commit 8d0b9bb59b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -193,17 +193,17 @@ jobs:
options: --tty --cap-add=ALL --privileged # docker create options
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- { uses: actions/checkout@v4, with: { submodules: "recursive", fetch-depth: 500, fetch-tags: true } }
- name: Flatpak
run: |
# write to an ignored filename so the build is not marked as modified
jq '.modules |= map(select(.name == "wesnoth").sources[0]={type:"dir",path:"."})' packaging/flatpak/org.wesnoth.Wesnoth.json > wesnoth-manifest.json
flatpak-builder --force-clean --default-branch=ci --disable-rofiles-fuse --jobs=2 wesnoth-app wesnoth-manifest.json
flatpak build-export export wesnoth-app ci
flatpak build-bundle export wesnoth.flatpak org.wesnoth.Wesnoth ci --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
git config --global --add safe.directory "$PWD"
branch=ci-$(git describe)
flatpak-builder --force-clean --default-branch="$branch" --disable-rofiles-fuse --jobs=2 wesnoth-app wesnoth-manifest.json
flatpak build-export export wesnoth-app "$branch"
flatpak build-bundle export wesnoth.flatpak org.wesnoth.Wesnoth "$branch" --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
- name: Upload flatpak bundle
uses: actions/upload-artifact@v4