diff --git a/.github/workflows/validate-external.yml b/.github/workflows/validate-external.yml index 1a150f7..bd51b9c 100644 --- a/.github/workflows/validate-external.yml +++ b/.github/workflows/validate-external.yml @@ -1,7 +1,9 @@ name: validate-external on: pull_request_target: - types: [opened, synchronize] + branches: + - main + types: [edited, opened, synchronize] jobs: authorize: if: github.repository != github.event.pull_request.head.repo.full_name @@ -18,3 +20,8 @@ jobs: secrets: ASSET_REPO: ${{ secrets.ASSET_REPO }} ASSET_REPO_TOKEN: ${{ secrets.ASSET_REPO_TOKEN }} + steps: + - name: Checkout PR branch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} diff --git a/.github/workflows/validate-internal.yml b/.github/workflows/validate-internal.yml index b5eb23a..040291d 100644 --- a/.github/workflows/validate-internal.yml +++ b/.github/workflows/validate-internal.yml @@ -4,9 +4,16 @@ on: branches: - main pull_request: - types: [opened, synchronize] + branches: + - main + types: [edited, opened, synchronize] jobs: build: if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name uses: ./.github/workflows/validate.yml secrets: inherit + steps: + - name: Checkout PR branch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 05002d3..7ceed34 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -26,6 +26,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + ref: ${{ github.event.pull_request.head.ref }} - name: Checkout Private Repository uses: actions/checkout@v4 @@ -92,6 +93,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + ref: ${{ github.event.pull_request.head.ref }} - name: Checkout private repository uses: actions/checkout@v4 @@ -170,6 +172,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + ref: ${{ github.event.pull_request.head.ref }} - name: Checkout Private Repository uses: actions/checkout@v4