Skip to content

Commit

Permalink
Merge pull request #5 from actions/readme
Browse files Browse the repository at this point in the history
Update README and examples
  • Loading branch information
lseppala authored Jun 16, 2022
2 parents 25b8553 + aae71a5 commit 9fcd421
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
name: Go Action detection of dependencies
on:
name: Go Dependency Submission
on
push:
branches:
- main

# The API requires write permission on the repository to submit dependencies
permissions:
contents: write

jobs:
go-action-detection:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version: ">=1.18.0"

- name: Run snapshot action
uses: dsp-testing/go-snapshot-action@main
uses: actions/go-dependency-submission@main
with:
go-mod-path: go-example/go.mod
go-build-target: go-example/cmd/octocat.go
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,35 @@ on:
push:
branches:
- main
# Envionment variables to configure Go and Go modules. Customize as necessary

# The API requires write permission on the repository to submit dependencies
permissions:
contents: write

# Environment variables to configure Go and Go modules. Customize as necessary
env:
GOPROXY: '' # A Go Proxy server to be used
GOPRIVATE: '' # A list of modules are considered private and not requested from GOPROXY

jobs:
go-action-detection:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version: ">=1.18.0"

- name: Run snapshot action
uses: actions/go-dependency-submission@main
with:
# Required: Define the repo path to the go.mod file used by the
# build target
go-mod-path: go-example/go.mod
#
# Optinoal: Define the path of a build target (a file with a
# Optional: Define the path of a build target (a file with a
# `main()` function) If not defined, this Action will collect all
# dependencies used by all build targets for the module, which may
# include Go dependencies used by tests and tooling.
Expand Down

0 comments on commit 9fcd421

Please sign in to comment.