From 89d7ec5ac1686002f5e75137f44ed6d3c8ffabfd Mon Sep 17 00:00:00 2001 From: Wim Velzeboer Date: Mon, 30 Mar 2026 11:38:15 +0100 Subject: [PATCH] Fix pipeline merge bug --- .github/workflows/deploy.and.test.yml | 2 ++ .github/workflows/publish.yml | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.and.test.yml b/.github/workflows/deploy.and.test.yml index b0f0451..c1ddffb 100644 --- a/.github/workflows/deploy.and.test.yml +++ b/.github/workflows/deploy.and.test.yml @@ -56,8 +56,10 @@ jobs: id: get-branch-name run: | if [ "${{ github.event_name }}" == "pull_request" ]; then + echo "Branch name: ${{ github.head_ref }}" echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_OUTPUT else + echo "Branch name: ${GITHUB_REF#refs/heads/}" echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT fi diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dcebe21..42ccb1a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,7 @@ name: Publish a new package version on: - pull_request: + pull_request_target: branches: - main types: @@ -13,10 +13,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout main branch + uses: actions/checkout@v6 with: - ref: ${{github.event.pull_request.head.ref}} - repository: ${{github.event.pull_request.head.repo.full_name}} + ref: main - name: Install Node.js uses: actions/setup-node@v4