diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 4a5841a3..cfa623a8 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -27,4 +27,4 @@ jobs: with: language: javascript repo-url: ${{ github.event.pull_request.head.repo.full_name || github.repository }} - commit-sha: ${{ github.event.workflow_run.head_sha || github.event.pull_request.head.sha || github.sha }} + commit-sha: ${{ github.event.workflow_run && github.event.workflow_run.head_sha || github.event.pull_request.head.sha || github.sha }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a4fc8d78..93c6b9a0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,7 +29,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 with: - ref: ${{ github.event.workflow_run.head_sha }} + ref: ${{ github.event.workflow_run.head_branch }} fetch-depth: 0 - name: Install node 24 @@ -47,6 +47,10 @@ jobs: git config user.name "${{ github.actor }}" git config user.email "${{ github.actor }}@users.noreply.github.com" + - name: Reset to workflow run commit + run: | + git reset --hard ${{ github.event.workflow_run.head_sha }} + - name: Get current version id: current-version run: |