|
| 1 | +name: Refresh Flatpak maven-dependencies |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [master] |
| 6 | + paths: |
| 7 | + - 'pom.xml' |
| 8 | + - '**/pom.xml' |
| 9 | + workflow_dispatch: |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: write |
| 13 | + pull-requests: write |
| 14 | + |
| 15 | +concurrency: |
| 16 | + group: refresh-flatpak-deps |
| 17 | + cancel-in-progress: true |
| 18 | + |
| 19 | +jobs: |
| 20 | + refresh: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + steps: |
| 23 | + - name: Checkout |
| 24 | + uses: actions/checkout@v6 |
| 25 | + |
| 26 | + - name: Install Flatpak + Flathub remote |
| 27 | + run: | |
| 28 | + sudo apt-get update |
| 29 | + sudo apt-get install -y flatpak |
| 30 | + sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo |
| 31 | +
|
| 32 | + - name: Install Flatpak SDK + openjdk21 extension |
| 33 | + run: | |
| 34 | + sudo flatpak install -y --noninteractive flathub \ |
| 35 | + org.freedesktop.Sdk//25.08 \ |
| 36 | + org.freedesktop.Sdk.Extension.openjdk21//25.08 |
| 37 | +
|
| 38 | + - name: Regenerate maven-dependencies.json |
| 39 | + run: ./distribution/linux/flatpak/generate-dependencies.sh |
| 40 | + |
| 41 | + - name: Open self-healing PR on drift |
| 42 | + uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 |
| 43 | + with: |
| 44 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 45 | + base: master |
| 46 | + branch: chore/flatpak-deps-refresh |
| 47 | + delete-branch: true |
| 48 | + add-paths: distribution/linux/flatpak/maven-dependencies.json |
| 49 | + commit-message: | |
| 50 | + chore(flatpak): regenerate maven-dependencies.json |
| 51 | + title: "chore(flatpak): refresh maven-dependencies.json" |
| 52 | + body: | |
| 53 | + Automated refresh of `distribution/linux/flatpak/maven-dependencies.json`. |
| 54 | +
|
| 55 | + The `refresh-flatpak-deps` workflow detected drift after a change to a |
| 56 | + `pom.xml` on `master` and regenerated the offline Maven manifest used by |
| 57 | + the Devel Flatpak build. |
| 58 | +
|
| 59 | + Safe to merge once review passes. If the regeneration itself is broken, |
| 60 | + the fix belongs in `distribution/linux/flatpak/generate-dependencies.sh`. |
| 61 | +
|
| 62 | + **Note:** CI does not run automatically on PRs opened by `GITHUB_TOKEN`. |
| 63 | + Close and reopen this PR, or push any commit to its branch, to trigger |
| 64 | + the usual `pr-builder` / `codeql-analysis` workflows. Upgrading this job |
| 65 | + to a PAT or GitHub App token would remove that limitation. |
0 commit comments