mirror of
https://github.com/SonarSource/sonarqube-scan-action.git
synced 2025-12-12 09:21:16 +00:00
SQSCANGHA-82 Automate the update of the Scanner CLI version
This commit is contained in:
parent
73cb22d49a
commit
3ed7560138
2 changed files with 11 additions and 3 deletions
11
.github/workflows/version_update.yml
vendored
11
.github/workflows/version_update.yml
vendored
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
pull-requests: write
|
||||
steps:
|
||||
- run: sudo apt install -y jq
|
||||
|
||||
- run: sudo snap install yq
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: master
|
||||
|
|
@ -31,7 +31,13 @@ jobs:
|
|||
run: |
|
||||
./scripts/fetch_latest_version.sh > sonar-scanner-version
|
||||
cat sonar-scanner-version >> $GITHUB_OUTPUT
|
||||
|
||||
- name: "Update default version"
|
||||
if: steps.tagged-version.outputs.sonar-scanner-version != steps.latest-version.outputs.sonar-scanner-version
|
||||
shell: bash
|
||||
env:
|
||||
NEW_VERSION: ${{ steps.latest-version.outputs.sonar-scanner-version }}
|
||||
run: |
|
||||
yq -i '.inputs.scannerVersion.default = "${NEW_VERSION}"' action.yml
|
||||
- name: "Create Pull Request for version update"
|
||||
if: steps.tagged-version.outputs.sonar-scanner-version != steps.latest-version.outputs.sonar-scanner-version
|
||||
shell: bash
|
||||
|
|
@ -44,6 +50,7 @@ jobs:
|
|||
git config --global user.email "sonartech@sonarsource.com"
|
||||
git checkout -b ${UPDATE_BRANCH}
|
||||
git add sonar-scanner-version
|
||||
git add action.yml
|
||||
git commit -m "${TITLE}"
|
||||
git push --force-with-lease origin ${UPDATE_BRANCH}
|
||||
gh pr list
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ inputs:
|
|||
scannerVersion:
|
||||
description: Version of the Sonar Scanner CLI to use
|
||||
required: false
|
||||
default: 6.2.1.4610 # to be kept in sync with sonar-scanner-version
|
||||
# to be kept in sync with sonar-scanner-version
|
||||
default: 6.2.1.4610
|
||||
scannerBinariesUrl:
|
||||
description: URL to download the Sonar Scanner CLI binaries from
|
||||
required: false
|
||||
|
|
|
|||
Loading…
Reference in a new issue