From 9dc56214b9e24b3cba341988bd547e8ba9f7c624 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 2 Oct 2020 13:12:14 +0000 Subject: [PATCH] github: switch PR workflow from an allowlist to a blocklist This is going to be less work to maintain going forward since we won't need to change it every time we include a new subproject. Signed-off-by: Harsh Shandilya --- .github/workflows/pull_request.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 1ef3b013..ec128f18 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -21,9 +21,9 @@ jobs: pull_number: context.payload.number, per_page: 100 }) - const serviceChanged = result.data.filter(f => f.filename.startsWith("app/") || f.filename.startsWith("buildSrc/") || f.filename.endsWith("gradle") || f.filename.startsWith(".github/workflows/pull_request.yml") || f.filename.startsWith("gradle") || f.filename.endsWith("properties")).length > 0 - console.log(serviceChanged) - return serviceChanged + const shouldRun = result.data.filter(f => !f.filename.endsWith(".md") || !f.filename.endsWith(".txt") || !f.filename.startsWith("contrib/") || !f.filename.endsWith(".yml")).length > 0 + console.log(shouldRun) + return shouldRun - name: Checkout repository if: ${{ steps.service-changed.outputs.result == 'true' }}