From 04850d9477d19875cb018c5aa75009a3463ff039 Mon Sep 17 00:00:00 2001 From: Jukka Kurkela Date: Sun, 18 Oct 2020 16:27:29 +0300 Subject: [PATCH] Stop deploying docs / drafting releases from forks (#7911) --- .github/workflows/deploy-docs.yml | 11 +++++++++-- .github/workflows/release-drafter.yml | 8 ++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index e6c7e2f3d..5bf66516f 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,5 +1,5 @@ # This workflow publishes new documentation to https://chartjs.org/docs/master after every commit -name: CI +name: Deploy docs on: push: @@ -7,9 +7,16 @@ on: - master jobs: - build: + correct_repository: runs-on: ubuntu-latest + steps: + - name: fail on fork + if: github.repository_owner != 'chartjs' + run: exit 1 + build: + needs: correct_repository + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Use Node.js diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 17fdb961d..064af1103 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -6,7 +6,15 @@ on: - master jobs: + correct_repository: + runs-on: ubuntu-latest + steps: + - name: fail on fork + if: github.repository_owner != 'chartjs' + run: exit 1 + update_release_draft: + needs: correct_repository runs-on: ubuntu-latest steps: - uses: release-drafter/release-drafter@v5 -- 2.47.3