-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUILD-4894 Add GitHub workflow that checks release credentials
- Loading branch information
1 parent
0ac53e9
commit b4264d1
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: credentials-sanity-check | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check-credentials: | ||
permissions: | ||
id-token: write | ||
contents: write | ||
runs-on: ubuntu-latest | ||
name: Check release credentials are valid | ||
steps: | ||
- name: Checkout custom actions | ||
uses: actions/checkout@v3 | ||
with: | ||
clean: false | ||
- name: Use Node 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
- name: Get vault secrets | ||
id: secrets | ||
uses: SonarSource/vault-action-wrapper@dc8fe04652687f7278f3ecd27905967836bab0eb # tag=2.7.4-1 | ||
with: | ||
secrets: | | ||
development/artifactory/token/{REPO_OWNER_NAME_DASH}-private-reader access_token | ARTIFACTORY_ACCESS_TOKEN; | ||
- name: Check marketplace publisher personal access token | ||
if: ${{ !cancelled() }} | ||
env: | ||
VSCE_TOKEN: ${{ secrets.VISUALSTUDIO_PAT }} | ||
working-directory: ./.github/actions/vsce-publish | ||
run: | | ||
cp ${GITHUB_WORKSPACE}/.cirrus/.npmrc ./.npmrc | ||
npm install | ||
npx vsce verify-pat -p "${VSCE_TOKEN}" SonarSource | ||
- name: Check Microsoft marketplace publisher personal access token | ||
if: ${{ !cancelled() }} | ||
env: | ||
OPENVSX_TOKEN: ${{ secrets.OPENVSX_TOKEN }} | ||
working-directory: ./.github/actions/ovsx-publish | ||
run: | | ||
cp ${GITHUB_WORKSPACE}/.cirrus/.npmrc ./.npmrc | ||
npm install | ||
npx ovsx verify-pat -p "${OPENVSX_TOKEN}" SonarSource | ||
- name: Check Artifactory reader token | ||
if: ${{ !cancelled() }} | ||
env: | ||
ARTIFACTORY_URL: https://repox.jfrog.io/artifactory | ||
ARTIFACTORY_ACCESS_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN }} | ||
run: | | ||
curl -s -o /dev/null \ | ||
-w '%{http_code}\n' \ | ||
-H "Authorization: Bearer ${ARTIFACTORY_ACCESS_TOKEN}" \ | ||
"${ARTIFACTORY_URL}/sonarsource-releases/org/sonarsource/sonarlint/vscode/sonarlint-vscode" |