Skip to content

Commit

Permalink
Use pull_request_target
Browse files Browse the repository at this point in the history
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
  • Loading branch information
frelon committed Feb 9, 2024
1 parent a016a52 commit 514463a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/build_and_test_x86.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
REPO: ghcr.io/${{ github.repository }}/elemental-${{ inputs.flavor }}
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
- run: |
git fetch --prune --unshallow
- name: Log in to registry
Expand Down Expand Up @@ -50,6 +52,8 @@ jobs:
REPO: ghcr.io/${{ github.repository }}/elemental-${{ inputs.flavor }}
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
- run: |
git fetch --prune --unshallow
- name: Cached ISO
Expand Down Expand Up @@ -87,6 +91,8 @@ jobs:
ARCH: x86_64
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
- run: |
git fetch --prune --unshallow
- name: Checks cached Disk
Expand Down Expand Up @@ -152,6 +158,8 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
- name: Install Go
uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -209,6 +217,8 @@ jobs:
COS_TIMEOUT: 1600
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
- name: Install Go
uses: actions/setup-go@v5
with:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: PR
on:
pull_request:
pull_request_target:
paths:
- tests/**
- make/**
Expand Down Expand Up @@ -35,6 +35,8 @@ jobs:
TOOLKIT_REPO: ghcr.io/${{github.repository}}/elemental-cli
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
- run: |
git fetch --prune --unshallow
- name: Log in to ghcr.io
Expand Down

0 comments on commit 514463a

Please sign in to comment.