Skip to content

Commit 5bf937b

Browse files
authored
🌱 Remove "pull_request_target" from Github Workflows. (#1556)
1 parent 7f39f6f commit 5bf937b

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

.github/workflows/pr-e2e.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: E2E PR Blocking
22
on:
3-
pull_request_target:
3+
pull_request:
44
types: [opened, synchronize, reopened, ready_for_review]
55
branches:
66
- main
@@ -16,13 +16,12 @@ env:
1616
jobs:
1717
manager-image:
1818
name: Build and push manager image
19-
if: github.event_name != 'pull_request_target' || !github.event.pull_request.draft
19+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout repository
2323
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424
with:
25-
ref: ${{ github.event.pull_request.head.sha }}
2625
fetch-depth: 0
2726

2827
- name: Build and push manager image
@@ -31,20 +30,18 @@ jobs:
3130

3231
test-release:
3332
name: Test Release
34-
if: github.event_name != 'pull_request_target' || !github.event.pull_request.draft
33+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
3534
runs-on: ubuntu-latest
3635
steps:
3736
- name: checkout
3837
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
39-
with:
40-
ref: ${{ github.event.pull_request.head.sha }}
4138
- name: Test Release
4239
id: manager-image
4340
uses: ./.github/actions/test-release
4441

4542
e2e-hcloud-basic:
4643
name: Test Hcloud Basic
47-
if: github.event_name != 'pull_request_target' || !github.event.pull_request.draft
44+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
4845
concurrency: ci-${{ github.ref }}-e2e-basic
4946
runs-on: ubuntu-latest
5047
permissions:
@@ -56,8 +53,6 @@ jobs:
5653
steps:
5754
- name: checkout
5855
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
59-
with:
60-
ref: ${{ github.event.pull_request.head.sha }}
6156
- name: Run e2e Test
6257
id: e2e
6358
uses: ./.github/actions/e2e
@@ -68,7 +63,7 @@ jobs:
6863

6964
e2e-hetzner-basic:
7065
name: Test Hetzner Baremetal Basic
71-
if: github.event_name != 'pull_request_target' || !github.event.pull_request.draft
66+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
7267
concurrency: ci-${{ github.ref }}-e2e-basic-hetzner
7368
runs-on: ubuntu-latest
7469
permissions:
@@ -80,8 +75,6 @@ jobs:
8075
steps:
8176
- name: checkout
8277
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
83-
with:
84-
ref: ${{ github.event.pull_request.head.sha }}
8578
- name: Run e2e Test
8679
id: e2e-bm
8780
uses: ./.github/actions/e2e

.github/workflows/pr-lint.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "Lint Pull Request"
22
on: # yamllint disable-line rule:truthy
33
workflow_dispatch:
4-
pull_request_target:
4+
pull_request:
55
types: [opened, edited, synchronize, reopened, ready_for_review]
66
paths:
77
- "**.go"
@@ -30,7 +30,6 @@ jobs:
3030
- name: Checkout repository
3131
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3232
with:
33-
ref: ${{ github.event.pull_request.head.sha }}
3433
fetch-depth: 0
3534

3635
- name: Fixup git permissions

.github/workflows/pr-verify.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Verify Pull Request
22
on: # yamllint disable-line rule:truthy
3-
pull_request_target:
3+
pull_request:
44
types: [opened, edited, synchronize, reopened, ready_for_review]
55
# yamllint disable rule:line-length
66
jobs:
@@ -16,8 +16,6 @@ jobs:
1616

1717
- name: Checkout repository
1818
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19-
with:
20-
ref: ${{ github.event.pull_request.head.sha }}
2119

2220
- name: Verify Boilerplate
2321
run: make verify-boilerplate

0 commit comments

Comments
 (0)