Skip to content

Commit 9fcd421

Browse files
authored
Merge pull request #5 from actions/readme
Update README and examples
2 parents 25b8553 + aae71a5 commit 9fcd421

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1-
name: Go Action detection of dependencies
2-
on:
1+
name: Go Dependency Submission
2+
on
33
push:
44
branches:
55
- main
66

7+
# The API requires write permission on the repository to submit dependencies
8+
permissions:
9+
contents: write
10+
711
jobs:
812
go-action-detection:
913
runs-on: ubuntu-latest
1014
steps:
1115
- name: 'Checkout Repository'
1216
uses: actions/checkout@v3
17+
1318
- uses: actions/setup-go@v3
1419
with:
1520
go-version: ">=1.18.0"
21+
1622
- name: Run snapshot action
17-
uses: dsp-testing/go-snapshot-action@main
23+
uses: actions/go-dependency-submission@main
1824
with:
1925
go-mod-path: go-example/go.mod
2026
go-build-target: go-example/cmd/octocat.go

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,35 @@ on:
1010
push:
1111
branches:
1212
- main
13-
# Envionment variables to configure Go and Go modules. Customize as necessary
13+
14+
# The API requires write permission on the repository to submit dependencies
15+
permissions:
16+
contents: write
17+
18+
# Environment variables to configure Go and Go modules. Customize as necessary
1419
env:
1520
GOPROXY: '' # A Go Proxy server to be used
1621
GOPRIVATE: '' # A list of modules are considered private and not requested from GOPROXY
22+
1723
jobs:
1824
go-action-detection:
1925
runs-on: ubuntu-latest
2026
steps:
2127
- name: 'Checkout Repository'
2228
uses: actions/checkout@v3
29+
2330
- uses: actions/setup-go@v3
2431
with:
2532
go-version: ">=1.18.0"
33+
2634
- name: Run snapshot action
2735
uses: actions/go-dependency-submission@main
2836
with:
2937
# Required: Define the repo path to the go.mod file used by the
3038
# build target
3139
go-mod-path: go-example/go.mod
3240
#
33-
# Optinoal: Define the path of a build target (a file with a
41+
# Optional: Define the path of a build target (a file with a
3442
# `main()` function) If not defined, this Action will collect all
3543
# dependencies used by all build targets for the module, which may
3644
# include Go dependencies used by tests and tooling.

0 commit comments

Comments
 (0)