diff --git a/.github/workflows/deploy-pr.yml b/.github/workflows/deploy-pr.yml index f16d55b9..7deb0333 100644 --- a/.github/workflows/deploy-pr.yml +++ b/.github/workflows/deploy-pr.yml @@ -1,6 +1,6 @@ name: Manage PR Temp Envs 'on': - pull_request_target: + pull_request: types: - labeled - unlabeled diff --git a/.github/workflows/docker-build.ecr.yml b/.github/workflows/docker-build.ecr.yml index 26d1b48f..0a819e12 100644 --- a/.github/workflows/docker-build.ecr.yml +++ b/.github/workflows/docker-build.ecr.yml @@ -7,12 +7,12 @@ on: tags: - '*' merge_group: - pull_request_target: + pull_request: types: [labeled, synchronize, reopened, ready_for_review, opened] env: PUSH_FROM_PR: >- - ${{ github.event_name == 'pull_request_target' && + ${{ github.event_name == 'pull_request' && ( contains(github.event.pull_request.labels.*.name, 'push-container') || contains(github.event.pull_request.labels.*.name, 'deploy-pr-temp-env') @@ -75,7 +75,7 @@ jobs: with: context: . platforms: linux/amd64, linux/arm64 - push: ${{ github.event_name != 'pull_request_target' || env.PUSH_FROM_PR == 'true' }} + push: ${{ github.event_name != 'pull_request' || env.PUSH_FROM_PR == 'true' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha diff --git a/.github/workflows/docker-build.ghcr.yml b/.github/workflows/docker-build.ghcr.yml index 35c061b4..de72fbaa 100644 --- a/.github/workflows/docker-build.ghcr.yml +++ b/.github/workflows/docker-build.ghcr.yml @@ -7,7 +7,7 @@ on: tags: - '*' merge_group: - pull_request_target: + pull_request: types: [labeled, synchronize, reopened, ready_for_review, opened] concurrency: @@ -18,7 +18,7 @@ env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} PUSH_FROM_PR: >- - ${{ github.event_name == 'pull_request_target' && + ${{ github.event_name == 'pull_request' && ( contains(github.event.pull_request.labels.*.name, 'push-container') || contains(github.event.pull_request.labels.*.name, 'deploy-pr-temp-env') @@ -84,14 +84,14 @@ jobs: with: context: . platforms: linux/amd64, linux/arm64 - push: ${{ github.event_name != 'pull_request_target' || env.PUSH_FROM_PR == 'true' }} + push: ${{ github.event_name != 'pull_request' || env.PUSH_FROM_PR == 'true' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - name: Generate artifact attestation - if: github.event_name != 'pull_request_target' || env.PUSH_FROM_PR == 'true' + if: github.event_name != 'pull_request' || env.PUSH_FROM_PR == 'true' uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0 with: subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}