mirror of
https://github.com/github/codeql-action.git
synced 2026-05-21 21:08:32 +00:00
Address review
This commit is contained in:
@@ -119,11 +119,16 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
depth: 1
|
||||
fetch-depth: 1
|
||||
|
||||
- id: head-version
|
||||
name: Determine Node version for HEAD
|
||||
run: |
|
||||
if [[ ! -f ".nvmrc" ]]; then
|
||||
echo "::error::Cannot find .nvmrc in the HEAD commit."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NODE_VERSION=$(cat .nvmrc)
|
||||
echo "NODE_VERSION: ${NODE_VERSION}"
|
||||
echo "node_version=${NODE_VERSION}" >> $GITHUB_OUTPUT
|
||||
@@ -133,12 +138,17 @@ jobs:
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ env.BASE_REF }}
|
||||
depth: 1
|
||||
fetch-depth: 1
|
||||
|
||||
- name: 'Backport: Verify Node versions unchanged'
|
||||
env:
|
||||
HEAD_VERSION: ${{ steps.head-version.outputs.node_version }}
|
||||
run: |
|
||||
if [[ ! -f ".nvmrc" ]]; then
|
||||
echo "::error::Cannot find .nvmrc in the base commit."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BASE_VERSION=$(cat .nvmrc)
|
||||
echo "HEAD_VERSION: ${HEAD_VERSION}"
|
||||
echo "BASE_VERSION: ${BASE_VERSION}"
|
||||
|
||||
Reference in New Issue
Block a user