From 540c3b79aaa361a249ff308401548318bb1f4b51 Mon Sep 17 00:00:00 2001 From: Stu Kilgore Date: Tue, 6 Dec 2022 11:14:20 -0600 Subject: [PATCH] Prevent docs gen workflow on forks (#6390) --- .changes/unreleased/Under the Hood-20221206-094015.yaml | 7 +++++++ .github/workflows/generate-cli-api-docs.yml | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changes/unreleased/Under the Hood-20221206-094015.yaml diff --git a/.changes/unreleased/Under the Hood-20221206-094015.yaml b/.changes/unreleased/Under the Hood-20221206-094015.yaml new file mode 100644 index 00000000000..ebcb9999430 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20221206-094015.yaml @@ -0,0 +1,7 @@ +kind: Under the Hood +body: Prevent doc gen workflow from running on forks +time: 2022-12-06T09:40:15.301984-06:00 +custom: + Author: stu-k + Issue: "6386" + PR: "6390" diff --git a/.github/workflows/generate-cli-api-docs.yml b/.github/workflows/generate-cli-api-docs.yml index 2364ea99fd6..bc079499b83 100644 --- a/.github/workflows/generate-cli-api-docs.yml +++ b/.github/workflows/generate-cli-api-docs.yml @@ -34,6 +34,7 @@ jobs: check_gen: name: check if generation needed runs-on: ubuntu-latest + if: ${{ github.event.pull_request.head.repo.fork == false }} outputs: cli_dir_changed: ${{ steps.check_cli.outputs.cli_dir_changed }} docs_dir_changed: ${{ steps.check_docs.outputs.docs_dir_changed }} @@ -44,8 +45,6 @@ jobs: echo "env.CLI_DIR: ${{ env.CLI_DIR }}" echo "env.DOCS_BUILD_DIR: ${{ env.DOCS_BUILD_DIR }}" echo "env.DOCS_DIR: ${{ env.DOCS_DIR }}" - echo ">>>>> git log" - git log --pretty=oneline | head -5 - name: git checkout uses: actions/checkout@v3