From fd4e44c0b334a2656818f5ba1698d7fd91a2727f Mon Sep 17 00:00:00 2001 From: Matt White <16320656+matt-FFFFFF@users.noreply.github.com> Date: Mon, 20 Jan 2025 10:30:02 +0000 Subject: [PATCH] ci: remove PR target --- .github/workflows/go-test-deployment.yml | 11 ++++++++--- .github/workflows/go-test-unit.yml | 9 +-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/go-test-deployment.yml b/.github/workflows/go-test-deployment.yml index 4640fdb3..221810f3 100644 --- a/.github/workflows/go-test-deployment.yml +++ b/.github/workflows/go-test-deployment.yml @@ -2,7 +2,7 @@ name: Deployment test on: - pull_request_target: + pull_request: types: ['opened', 'reopened', 'synchronize', 'labeled'] workflow_dispatch: inputs: @@ -36,7 +36,13 @@ jobs: if: | ( ( - contains(github.event.pull_request.labels.*.name, 'PR: Safe to test :test_tube:') + ( + contains(github.event.pull_request.labels.*.name, 'PR: Safe to test :test_tube:') + ) + && + ( + github.event.pull_request.head.repo.full_name == 'Azure/terraform-azurerm-lz-vending' + ) ) || ( @@ -57,7 +63,6 @@ jobs: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - ref: ${{ github.event.pull_request.head.sha }} persist-credentials: false - name: Setup Terraform diff --git a/.github/workflows/go-test-unit.yml b/.github/workflows/go-test-unit.yml index 3f26334c..9cc13ff2 100644 --- a/.github/workflows/go-test-unit.yml +++ b/.github/workflows/go-test-unit.yml @@ -2,7 +2,7 @@ name: Unit test on: - pull_request_target: + pull_request: types: ['opened', 'reopened', 'synchronize', 'labeled'] merge_group: workflow_dispatch: @@ -40,12 +40,6 @@ jobs: github.event.pull_request.head.repo.full_name == 'Azure/terraform-azurerm-lz-vending' ) || - ( - github.event.pull_request.head.repo.full_name != 'Azure/terraform-azurerm-lz-vending' - && - contains(github.event.pull_request.labels.*.name, 'PR: Safe to test :test_tube:') - ) - || ( github.event_name == 'workflow_dispatch' ) @@ -63,7 +57,6 @@ jobs: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - ref: ${{ github.event.pull_request.head.sha }} persist-credentials: false - name: Setup Terraform