-
Notifications
You must be signed in to change notification settings - Fork 83
59 lines (54 loc) · 1.99 KB
/
credcheck.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
env:
ARTIFACTORY_URL: https://repox.jfrog.io/artifactory
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_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"