Ensure cli using latest version from the supported_cli_versions.json (#1992)

This commit is contained in:
Taj
2023-01-20 17:13:14 +00:00
committed by GitHub
parent a17e41cbf1
commit c7f72c5aa9
6 changed files with 10 additions and 17 deletions

View File

@@ -45,10 +45,10 @@ jobs:
- name: Prepend another version
if: ${{ inputs.option == 'prepend' }}
run: |
cat supported_cli_versions.json | jq '. |= ["${{ inputs.version }}"] + .' > supported_cli_versions_temp.json
mv supported_cli_versions_temp.json supported_cli_versions.json
cat extensions/ql-vscode/supported_cli_versions.json | jq '. |= ["${{ inputs.version }}"] + .' > supported_cli_versions_temp.json
mv supported_cli_versions_temp.json extensions/ql-vscode/supported_cli_versions.json
echo "LATEST_VERSION=${{ inputs.version }}" >> $GITHUB_ENV
echo "PREVIOUS_VERSION=`jq -r '.[1]' supported_cli_versions.json`" >> $GITHUB_ENV
echo "PREVIOUS_VERSION=`jq -r '.[1]' extensions/ql-vscode/supported_cli_versions.json`" >> $GITHUB_ENV
- name: Commit, Push and Open a PR
uses: ./.github/actions/create-pr
with:

View File

@@ -191,7 +191,7 @@ jobs:
uses: actions/checkout@v3
- name: Set the variables
id: set-variables
run: echo "cli-versions=$(cat ./supported_cli_versions.json | jq -rc)" >> $GITHUB_OUTPUT
run: echo "cli-versions=$(cat ./extensions/ql-vscode/supported_cli_versions.json | jq -rc)" >> $GITHUB_OUTPUT
outputs:
cli-versions: ${{ steps.set-variables.outputs.cli-versions }}
cli-test: