From d59f81978e38a40bcf3cd6e9c93b11ff8789685d Mon Sep 17 00:00:00 2001 From: MarkvanMents Date: Thu, 10 Sep 2026 11:50:18 +0200 Subject: [PATCH 1/2] Prevent build-and-deploy workflow from running in forks The push and pull_request triggers caused the workflow to run in forked repositories, wasting Actions minutes and potentially failing on missing secrets. Adding `if: github.event.repository.fork == false` to the build job ensures the workflow only runs in the main repository. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/build-and-deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index d949c93eadb..0ee95381fc4 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -24,6 +24,7 @@ on: jobs: build: runs-on: ubuntu-22.04 + if: github.event.repository.fork == false outputs: target: ${{ steps.env.outputs.target }} concurrency: From 04bc611b0b0cb53f19f884b6f2ded6c64d839702 Mon Sep 17 00:00:00 2001 From: MarkvanMents Date: Thu, 17 Sep 2026 12:07:37 +0200 Subject: [PATCH 2/2] User github_repository_owner rather than github.event.repository.fork The owner is unlikely to change, and github.repository is always available in the context rather than being part of the payload. --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 0ee95381fc4..b110a077095 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -24,7 +24,7 @@ on: jobs: build: runs-on: ubuntu-22.04 - if: github.event.repository.fork == false + if: github.repository_owner == 'mendix' outputs: target: ${{ steps.env.outputs.target }} concurrency: