File tree Expand file tree Collapse file tree 3 files changed +48
-2
lines changed
Expand file tree Collapse file tree 3 files changed +48
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : Configure Poetry for Windows
3+ description : GitHub Action to configure a poetry project for windows runner
4+
5+ outputs :
6+ BUILD_NUMBER :
7+ description : The build number, incremented or reused if already cached
8+ value : ${{ steps.get_build_number.outputs.BUILD_NUMBER }}
9+
10+ runs :
11+ using : composite
12+ steps :
13+ - name : Set build parameters
14+ shell : bash
15+ env :
16+ ARTIFACTORY_READER_ROLE : private-reader
17+ run : |
18+ echo "ARTIFACTORY_READER_ROLE=${ARTIFACTORY_READER_ROLE}" >> "$GITHUB_ENV"
19+ - uses : SonarSource/ci-github-actions/get-build-number@v1
20+ id : get_build_number
21+ - name : Cache local Poetry cache
22+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
23+ with :
24+ path : ${{ github.workspace }}/.cache/pypoetry
25+ key : poetry-${{ runner.os }}-${{ hashFiles('poetry.lock') }}
26+ restore-keys : poetry-${{ runner.os }}-
27+ - name : Vault
28+ # yamllint disable rule:line-length
29+ id : secrets
30+ uses : SonarSource/vault-action-wrapper@320bd31b03e5dacaac6be51bbbb15adf7caccc32 # 3.1.0
31+ with :
32+ secrets : |
33+ development/artifactory/token/{REPO_OWNER_NAME_DASH}-${{ env.ARTIFACTORY_READER_ROLE }} access_token | ARTIFACTORY_ACCESS_TOKEN;
34+ # yamllint enable rule:line-length
35+ - name : Config Poetry
36+ id : config
37+ shell : pwsh
38+ env :
39+ ARTIFACTORY_URL : https://repox.jfrog.io/artifactory
40+ ARTIFACTORY_PYPI_REPO : sonarsource-pypi
41+ ARTIFACTORY_ACCESS_TOKEN : ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN }}
42+ run : |
43+ Start-Process -Wait -Verb RunAs powershell '-NoProfile iwr https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/[RELEASE]/jfrog-cli-windows-amd64/jf.exe -OutFile $env:SYSTEMROOT\system32\jf.exe'
44+ jf intro
45+ ${GITHUB_ACTION_PATH}/../../scripts/config-poetry.sh
46+
Original file line number Diff line number Diff line change 4242 env :
4343 ARTIFACTORY_URL : https://repox.jfrog.io/artifactory
4444 ARTIFACTORY_PYPI_REPO : sonarsource-pypi
45- ARTIFACTORY_ACCESS_TOKEN : ${{ steps.secrets.outputs.vault && fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN || '' }}
45+ ARTIFACTORY_ACCESS_TOKEN : ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN }}
4646 run : |
4747 mise use -g poetry@2.2.1
4848 mise use -g jfrog-cli@2.77.0
49- ${GITHUB_ACTION_PATH}/config-poetry.sh
49+ ${GITHUB_ACTION_PATH}/../../scripts/ config-poetry.sh
5050
File renamed without changes.
You can’t perform that action at this time.
0 commit comments