fix: npm action branch detection (#2308)

This commit is contained in:
Sasha 2025-03-19 11:55:59 +01:00 committed by GitHub
parent edfb56243d
commit 044da751bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,12 +3,8 @@ name: npm i
runs:
using: "composite"
steps:
- run: echo "$GITHUB_CONTEXT"
- if: ${{ github.ref == 'refs/heads/master' || github.head_ref == 'release-please--branches--master' }}
run: npm i
shell: bash
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
- run: npm i
shell: bash
if: ${{ contains('refs/heads/master refs/heads/release-please--branches--master', github.ref) }}
- uses: bahmutov/npm-install@v1
if: ${{ !contains('refs/heads/master refs/heads/release-please--branches--master', github.ref) }}
- if: ${{ github.ref != 'refs/heads/master' && github.head_ref != 'release-please--branches--master' }}
uses: bahmutov/npm-install@v1