Fix pipeline merge bug
This commit is contained in:
@@ -56,8 +56,10 @@ jobs:
|
|||||||
id: get-branch-name
|
id: get-branch-name
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||||
|
echo "Branch name: ${{ github.head_ref }}"
|
||||||
echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_OUTPUT
|
echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
|
echo "Branch name: ${GITHUB_REF#refs/heads/}"
|
||||||
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
|
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: Publish a new package version
|
name: Publish a new package version
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request_target:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
types:
|
types:
|
||||||
@@ -13,10 +13,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout main branch
|
||||||
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
ref: main
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user