From 235c0e5a5a0448bf4b8acdf6fe713a9a90c6470f Mon Sep 17 00:00:00 2001 From: Thomas Stilwell Date: Sun, 27 Oct 2024 15:11:08 +0100 Subject: [PATCH] fixup! [nrf noup] ci: enable custom base for `manifest-PR` --- .github/workflows/manifest-PR.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/manifest-PR.yml b/.github/workflows/manifest-PR.yml index 3f60f1494e8..ff54eed6847 100644 --- a/.github/workflows/manifest-PR.yml +++ b/.github/workflows/manifest-PR.yml @@ -12,17 +12,19 @@ jobs: call-manifest-pr-action: runs-on: ubuntu-latest env: - TARGET_BASE_BRANCH: ${{ github.ref == 'refs/heads/v3.7.99-ncs1-branch' && 'v2.8-branch' || 'main' }} + TARGET_BASE_BRANCH: ${{ github.event.pull_request.base.ref == 'refs/heads/v3.7.99-ncs1-branch' && 'v2.8-branch' || 'main' }} # myjson: '{"v3.7.99-ncs1-branch" : "v2.8-branch", "v3.7.99-ncs1-branch": "v2.7-branch"}' steps: - - name: set TARGET_BASE_BRANCH - run: - echo "github.ref=${{ github.ref }} - echo "github.event.pull_request.base.ref=${{ github.event.pull_request.base.ref }} - # run: echo "TARGET_BASE_BRANCH=${{ TARGET_BASE_BRANCH }} + # - name: set TARGET_BASE_BRANCH + # # run: echo "github.event.pull_request.base.ref=${{ github.event.pull_request.base.ref }} + # run: echo "TARGET_BASE_BRANCH=${{ fromJSON(env.myjson)[env.var_foo] }}" >> $GITHUB_ENV + + - name: read TARGET_BASE_BRANCH + run: echo "TARGET_BASE_BRANCH=${{ TARGET_BASE_BRANCH }} + + # if: contains(['SNAPSHOT'],env.BUILD_VERSION) # run: echo '{{ github.event.pull_request.base.ref}}' - # run: echo "TARGET_BASE_BRANCH=${{ fromJSON(env.myjson)[env.var_foo] }}" >> $GITHUB_ENV # - name: handle manifest PR # uses: thst-nordic/action-manifest-pr@add_release_branches