From 84d2c4f1a664d5f7d800bac250e264774ce729b5 Mon Sep 17 00:00:00 2001 From: zernonia Date: Tue, 16 Jan 2024 23:08:25 +0800 Subject: [PATCH] chore: test using ref sha --- .github/workflows/publish.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 8c407ce8..e4d64b66 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -52,6 +52,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha || github.ref }} + fetch-depth: 0 + + - name: Print pull request head information + run: | + echo "Pull Request SHA: ${{ github.event.pull_request.head.sha }}" + echo "Pull Request Ref: ${{ github.event.pull_request.head.ref }}" # Run a build step here - name: Setup Node.js environment