From 044da751bde49a820312283f996967ed475328be Mon Sep 17 00:00:00 2001 From: Sasha <118575614+weboko@users.noreply.github.com> Date: Wed, 19 Mar 2025 11:55:59 +0100 Subject: [PATCH] fix: npm action branch detection (#2308) --- .github/actions/npm/action.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/actions/npm/action.yml b/.github/actions/npm/action.yml index 411bc0e5b0..f2c033d79b 100644 --- a/.github/actions/npm/action.yml +++ b/.github/actions/npm/action.yml @@ -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