Skip to content

Commit

Permalink
fix CI (#142)
Browse files Browse the repository at this point in the history
related to failed jobs on the `nightly` branch...

## description
this PR adds a little step to show the target branch and the current
branch and fixes the logic to set the Nushell and Nupm revisions.
  • Loading branch information
amtoine authored Dec 15, 2023
1 parent 529ff39 commit 2d0e2c0
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/nupm-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,29 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Nushell and Nupm versions
shell: bash
run: |
echo "target: ${{github.base_ref}}"
echo "ref: ${{github.ref}}"
if [[ ${{ github.base_ref }} == 'nightly' ]]; then
echo "NU_VERSION='nightly'" >> $GITHUB_ENV
echo "NUPM_REVISION='main'" >> $GITHUB_ENV
elif [[ ${{ github.ref }} == 'refs/heads/nightly' ]]; then
echo "NU_VERSION='nightly'" >> $GITHUB_ENV
echo "NUPM_REVISION='main'" >> $GITHUB_ENV
else
echo "NU_VERSION=${{ inputs.nu_version }}" >> $GITHUB_ENV
echo "NUPM_REVISION=${{ inputs.nupm_revision }}" >> $GITHUB_ENV
fi
- name: Setup nushell and nupm
uses: amtoine/setup-nupm-action@0.1.1
id: "nu-setup"
with:
nu_version: ${{github.base_ref == 'nightly' && 'nightly' || inputs.nu_version}}
nupm_revision: ${{github.base_ref == 'nightly' && 'main' || inputs.nupm_revision}}
nu_version: ${{ env.NU_VERSION }}
nupm_revision: ${{ env.NUPM_REVISION }}

- name: Set up Git
shell: bash
Expand Down

0 comments on commit 2d0e2c0

Please sign in to comment.