Skip to content

Commit 044da75

Browse files
authored
fix: npm action branch detection (#2308)
1 parent edfb562 commit 044da75

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/actions/npm/action.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@ name: npm i
33
runs:
44
using: "composite"
55
steps:
6-
- run: echo "$GITHUB_CONTEXT"
6+
- if: ${{ github.ref == 'refs/heads/master' || github.head_ref == 'release-please--branches--master' }}
7+
run: npm i
78
shell: bash
8-
env:
9-
GITHUB_CONTEXT: ${{ toJson(github) }}
10-
- run: npm i
11-
shell: bash
12-
if: ${{ contains('refs/heads/master refs/heads/release-please--branches--master', github.ref) }}
13-
- uses: bahmutov/npm-install@v1
14-
if: ${{ !contains('refs/heads/master refs/heads/release-please--branches--master', github.ref) }}
9+
- if: ${{ github.ref != 'refs/heads/master' && github.head_ref != 'release-please--branches--master' }}
10+
uses: bahmutov/npm-install@v1

0 commit comments

Comments
 (0)