From 3f96041a4f15e0387dd7635c8cb80ee6dab14aa5 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Fri, 2 Jun 2023 15:08:17 +0000 Subject: [PATCH 1/2] hotfix(ci): skip DataDog upload on forks --- .github/actions/upload-datadog/action.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/upload-datadog/action.yaml b/.github/actions/upload-datadog/action.yaml index 88d4454aab7c8..2294cd81ebd6c 100644 --- a/.github/actions/upload-datadog/action.yaml +++ b/.github/actions/upload-datadog/action.yaml @@ -9,6 +9,10 @@ runs: steps: - shell: bash run: | + if [[ ${{ github.event.pull_request.head.repo.full_name != 'coder/coder' ]]; then + echo "Not a pull request from the main repo, skipping..." + exit 0 + fi npm install -g @datadog/datadog-ci datadog-ci junit upload --service coder ./gotests.xml \ --tags os:${{runner.os}} --tags runner_name:${{runner.name}} From 499e8050e8a4981d44b6449c4d96bf66fbd0429f Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Fri, 2 Jun 2023 15:12:07 +0000 Subject: [PATCH 2/2] fixup! hotfix(ci): skip DataDog upload on forks --- .github/actions/upload-datadog/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/upload-datadog/action.yaml b/.github/actions/upload-datadog/action.yaml index 2294cd81ebd6c..84fc98b19ee1e 100644 --- a/.github/actions/upload-datadog/action.yaml +++ b/.github/actions/upload-datadog/action.yaml @@ -9,7 +9,7 @@ runs: steps: - shell: bash run: | - if [[ ${{ github.event.pull_request.head.repo.full_name != 'coder/coder' ]]; then + if [[ ${{ github.event.pull_request.head.repo.full_name != 'coder/coder' }} ]]; then echo "Not a pull request from the main repo, skipping..." exit 0 fi