@@ -1,20 +1,26 @@
|
|||||||
name: Go Action detection of dependencies
|
name: Go Dependency Submission
|
||||||
on:
|
on
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
# The API requires write permission on the repository to submit dependencies
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
go-action-detection:
|
go-action-detection:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout Repository'
|
- name: 'Checkout Repository'
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/setup-go@v3
|
- uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.18.0"
|
go-version: ">=1.18.0"
|
||||||
|
|
||||||
- name: Run snapshot action
|
- name: Run snapshot action
|
||||||
uses: dsp-testing/go-snapshot-action@main
|
uses: actions/go-dependency-submission@main
|
||||||
with:
|
with:
|
||||||
go-mod-path: go-example/go.mod
|
go-mod-path: go-example/go.mod
|
||||||
go-build-target: go-example/cmd/octocat.go
|
go-build-target: go-example/cmd/octocat.go
|
||||||
@@ -10,19 +10,27 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- 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:
|
env:
|
||||||
GOPROXY: '' # A Go Proxy server to be used
|
GOPROXY: '' # A Go Proxy server to be used
|
||||||
GOPRIVATE: '' # A list of modules are considered private and not requested from GOPROXY
|
GOPRIVATE: '' # A list of modules are considered private and not requested from GOPROXY
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
go-action-detection:
|
go-action-detection:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout Repository'
|
- name: 'Checkout Repository'
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/setup-go@v3
|
- uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.18.0"
|
go-version: ">=1.18.0"
|
||||||
|
|
||||||
- name: Run snapshot action
|
- name: Run snapshot action
|
||||||
uses: actions/go-dependency-submission@main
|
uses: actions/go-dependency-submission@main
|
||||||
with:
|
with:
|
||||||
@@ -30,7 +38,7 @@ jobs:
|
|||||||
# build target
|
# build target
|
||||||
go-mod-path: go-example/go.mod
|
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
|
# `main()` function) If not defined, this Action will collect all
|
||||||
# dependencies used by all build targets for the module, which may
|
# dependencies used by all build targets for the module, which may
|
||||||
# include Go dependencies used by tests and tooling.
|
# include Go dependencies used by tests and tooling.
|
||||||
|
|||||||
Reference in New Issue
Block a user