Skip to content
This repository was archived by the owner on Jun 16, 2022. It is now read-only.

Commit 68868b1

Browse files
authored
Provide example Action
1 parent b35953e commit 68868b1

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

README.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,32 @@ An Action that creates a dependency submission using `go mod graph`.
44

55
Optional inputs for the Action include: `detector-name`, `detector-url`, `detector-version`, and `metadata` - a JSON of max eight keys to provide with the snapshot.
66

7+
### Example
78
```
8-
name: Run snapshot action
9-
uses: @dsp-testing/go-snapshot-action
10-
with:
11-
# All of the below have defaults, but can be overriden manually
12-
detector-name: go snapshot action
13-
detector-url: ${{ github.server_url }}/${{ github.repository }}
14-
detector-version: 1.0.0
15-
metadata: '{"lastModified": "22-04-2022"}'
9+
name: Go Action detection of dependencies
10+
on:
11+
push:
12+
branches:
13+
- main
14+
# Envionment variables to configure Go and Go modules. Customize as necessary
15+
env:
16+
GOPROXY: '' # A Go Proxy server to be used
17+
GOPRIVATE: '' # A list of modules are considered private and not requested from GOPROXY
18+
jobs:
19+
go-action-detection:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: 'Checkout Repository'
23+
uses: actions/checkout@v3
24+
- uses: actions/setup-go@v3
25+
with:
26+
go-version: ">=1.18.0"
27+
- name: Run snapshot action
28+
uses: @dsp-testing/go-snapshot-action
29+
with:
30+
# All of the below have defaults, but can be overriden manually
31+
detector-name: go snapshot action
32+
detector-url: ${{ github.server_url }}/${{ github.repository }}
33+
detector-version: 1.0.0
34+
metadata: '{"lastModified": "22-04-2022"}'
1635
```

0 commit comments

Comments
 (0)