From a1e581c8e8a4fa8acd0508399f6837b2bd453ff2 Mon Sep 17 00:00:00 2001 From: AL2009man <67606569+AL2009man@users.noreply.github.com> Date: Wed, 30 Apr 2025 21:39:37 -0400 Subject: [PATCH] attempt to fix CI GitHub Action PRs --- .github/workflows/validate-external.yml | 9 ++++++++- .github/workflows/validate-internal.yml | 9 ++++++++- .github/workflows/validate.yml | 3 +++ 3 files changed, 19 insertions(+), 2 deletions(-) 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 9027616..0daf2b0 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