From 0949ed18a1aaa7bf585143f65d575436c5314333 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 7 Nov 2026 18:03:22 -0500 Subject: [PATCH] Let PRs without package changes merge without a build --- .github/workflows/validate-flatpak.yml | 34 ++++++++++++++++++++------ 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/validate-flatpak.yml b/.github/workflows/validate-flatpak.yml index a905e71..dcc0600 100644 --- a/.github/workflows/validate-flatpak.yml +++ b/.github/workflows/validate-flatpak.yml @@ -1,26 +1,46 @@ name: Validate Flatpak update on: + # Runs on every PR so the required check always reports. A skipped build + # counts as passing, so PRs without package changes can still merge. pull_request: - paths: - - .github/workflows/validate-flatpak.yml - - .github/workflows/publish-flatpak.yml - - flatpak/** - - '!flatpak/pages/**' - - patches/** - - tests/packaged/** workflow_dispatch: permissions: contents: read + pull-requests: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: + changes: + name: Check for package changes + runs-on: ubuntu-24.04 + outputs: + # Manual runs always build. + package: ${{ github.event_name == 'workflow_dispatch' || steps.filter.outputs.package }} + steps: + - name: Check changed files + id: filter + if: github.event_name == 'pull_request' + uses: dorny/paths-filter@v4 + with: + predicate-quantifier: some-with-excludes + filters: | + package: + - .github/workflows/validate-flatpak.yml + - .github/workflows/publish-flatpak.yml + - flatpak/** + - '!flatpak/pages/**' + - patches/** + - tests/packaged/** + build: name: Build and test Flatpak + needs: changes + if: needs.changes.outputs.package == 'true' runs-on: ubuntu-24.04 timeout-minutes: 120 container: