-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.61 KB
/
Copy pathnancy.yaml
File metadata and controls
51 lines (44 loc) · 1.61 KB
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
name: Nancy Scan
on:
workflow_call:
inputs:
dir:
required: false
type: string
secrets:
PROBE_APP_ID:
required: false
PROBE_APP_PRIVATE_KEY:
required: false
jobs:
nancy_scan:
name: Sonatype Nexus
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1
with:
app-id: ${{ secrets.PROBE_APP_ID }}
private-key: ${{ secrets.PROBE_APP_PRIVATE_KEY }}
owner: TykTechnologies
- name: Check out code into the Go module directory
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Set up Go 1.x in order to write go.list file
uses: actions/setup-go@be3c94b385c4f180051c996d336f57a34c397495 # v3
with:
go-version: 1.17
- name: Configure git access for Tyk's private Go modules
env:
GITHUB_PAT: ${{ steps.app-token.outputs.token }}
run: |
echo "https://x-access-token:$GITHUB_PAT@github.com" >> ~/.git-credentials
git config --global credential.helper store
git config --global url."https://x-access-token:${GITHUB_PAT}@github.com/".insteadOf "https://github.com/"
- name: Write Go List
run: go list -json -m all > go.list
working-directory: ./${{ inputs.dir }}
- name: Nancy scan
uses: sonatype-nexus-community/nancy-github-action@395e2fb168f674f96502e5652103d112899ea369 # main
with:
goListFile: ${{ inputs.dir }}/go.list