From 4e97c91f9a89a38ba13d767f2f87b2e2681d2d9a Mon Sep 17 00:00:00 2001 From: Wenxi Zeng Date: Thu, 21 Oct 2021 14:28:44 -0700 Subject: [PATCH] address-pull-request-target-discrepancies --- .github/workflows/swift.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index cd7e9378..e7c64f25 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -3,8 +3,6 @@ name: Swift on: push: branches: [ main ] - pull_request: - branches: [ main ] pull_request_target: branches: [ main ] @@ -16,6 +14,8 @@ jobs: with: xcode-version: '13.0' - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - uses: webfactory/ssh-agent@v0.5.3 with: ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }} @@ -31,6 +31,8 @@ jobs: with: swift-version: "5.4" - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - uses: webfactory/ssh-agent@v0.5.3 with: ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }} @@ -46,6 +48,8 @@ jobs: with: xcode-version: '13.0' - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - uses: webfactory/ssh-agent@v0.5.3 with: ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }} @@ -58,6 +62,8 @@ jobs: with: xcode-version: '13.0' - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - uses: webfactory/ssh-agent@v0.5.3 with: ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }} @@ -70,6 +76,8 @@ jobs: with: xcode-version: '13.0' - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - uses: webfactory/ssh-agent@v0.5.3 with: ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }} @@ -82,6 +90,8 @@ jobs: with: xcode-version: '13.0' - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - uses: webfactory/ssh-agent@v0.5.3 with: ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }}