diff --git a/.github/workflows/publish-flatpak.yml b/.github/workflows/publish-flatpak.yml index dd46523..db88915 100644 --- a/.github/workflows/publish-flatpak.yml +++ b/.github/workflows/publish-flatpak.yml @@ -40,6 +40,10 @@ jobs: container: image: ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-25.08 options: --privileged + # Updating a runtime that ships in the image fails with "Invalid cross-device link" on the + # image's layered filesystem. A volume starts as a copy of the image's installation. + volumes: + - /var/lib/flatpak environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} @@ -48,6 +52,11 @@ jobs: - name: Check out repository uses: actions/checkout@v6 + # flatpak-builder copies its cached git mirrors right after fetching them, while a + # background `git gc` could still be repacking them. + - name: Run git gc before fetches return + run: git config --global gc.autoDetach false + - name: Import repository signing key id: signing uses: crazy-max/ghaction-import-gpg@v7 diff --git a/.github/workflows/validate-flatpak.yml b/.github/workflows/validate-flatpak.yml index dcc0600..87394a9 100644 --- a/.github/workflows/validate-flatpak.yml +++ b/.github/workflows/validate-flatpak.yml @@ -46,10 +46,19 @@ jobs: container: image: ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-25.08 options: --privileged + # Updating a runtime that ships in the image fails with "Invalid cross-device link" on the + # image's layered filesystem. A volume starts as a copy of the image's installation. + volumes: + - /var/lib/flatpak steps: - name: Check out repository uses: actions/checkout@v6 + # flatpak-builder copies its cached git mirrors right after fetching them, while a + # background `git gc` could still be repacking them. + - name: Run git gc before fetches return + run: git config --global gc.autoDetach false + - name: Build and test Flatpak uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: