From c28872717c7fad85bdb593b8b77e43233315515d Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Sat, 30 Nov 2024 15:30:55 +0300 Subject: [PATCH] ci: prevent jobs running on PRs from forks Signed-off-by: Mohammed Al Sahaf --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 049003233d5..49a23fa4531 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,7 +143,7 @@ jobs: s390x-test: name: test (s390x on IBM Z) runs-on: ubuntu-latest - if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' + if: (github.repository == 'caddyserver/caddy' && github.event_name != 'pull_request') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'caddyserver/caddy') && github.actor != 'dependabot[bot]' continue-on-error: true # August 2020: s390x VM is down due to weather and power issues steps: - name: Checkout code @@ -194,7 +194,7 @@ jobs: goreleaser-check: runs-on: ubuntu-latest - if: github.repository_owner == 'caddyserver' && github.actor != 'dependabot[bot]' + if: (github.repository == 'caddyserver/caddy' && github.event_name != 'pull_request') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'caddyserver/caddy') && github.actor != 'dependabot[bot]' steps: - name: Checkout code uses: actions/checkout@v4