-
Notifications
You must be signed in to change notification settings - Fork 94
36 lines (36 loc) · 1.45 KB
/
dependencies-and-licenses.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
name: Dependencies and Licenses
on:
release:
types:
- published
defaults:
run:
shell: bash
jobs:
generate-dependencies:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Core Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed #v5.1.0
with:
go-version: '~1.23'
- name: Install go-licence-detector
run: |
go install go.elastic.co/[email protected]
- name: Clean Go mod
run: go mod tidy
- name: Generate Dependencies and Licenses
run: go list -m -json all | go-licence-detector -includeIndirect -depsTemplate=.dependencies/templates/dependencies.csv.tmpl -depsOut=dependencies-and-licenses.txt
- name: Upload dependencies and licenses artifact
run: |
curl --request POST "https://uploads.github.com/repos/Dynatrace/dynatrace-configuration-as-code/releases/${{ github.event.release.id }}/assets?name=dependencies-and-licenses.txt" \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
--header "X-GitHub-Api-Version: 2022-11-28" \
--header "Content-Type: application/octet-stream" \
--fail \
--data-binary @dependencies-and-licenses.txt