From 3bd546afc00eab5d9e86cb58ac2d721ad6a6a943 Mon Sep 17 00:00:00 2001 From: Patrick Carlisle Date: Wed, 15 Jun 2022 17:15:07 -0700 Subject: [PATCH 1/4] Spell check the readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8f43ca2..18da28b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ on: push: branches: - main -# Envionment variables to configure Go and Go modules. Customize as necessary +# 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 @@ -30,7 +30,7 @@ jobs: # 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. From 68b92934ce8314a570ad621c42124980c28543cf Mon Sep 17 00:00:00 2001 From: Patrick Carlisle Date: Wed, 15 Jun 2022 17:21:21 -0700 Subject: [PATCH 2/4] Add permissions to example and format a little --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 18da28b..e0ed4f6 100644 --- a/README.md +++ b/README.md @@ -10,19 +10,27 @@ on: push: branches: - main + +# 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: From de5e3ff32cdf40da10ae4e96f5bc217643041ab5 Mon Sep 17 00:00:00 2001 From: Patrick Carlisle Date: Wed, 15 Jun 2022 17:21:36 -0700 Subject: [PATCH 3/4] Use the right actions url in our own use --- .github/workflows/go-action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go-action.yml b/.github/workflows/go-action.yml index f109c9f..4428d01 100644 --- a/.github/workflows/go-action.yml +++ b/.github/workflows/go-action.yml @@ -14,7 +14,7 @@ jobs: 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 From aae71a5c8fdfcdb1e5fac792cff393983de6458f Mon Sep 17 00:00:00 2001 From: Patrick Carlisle Date: Wed, 15 Jun 2022 17:24:38 -0700 Subject: [PATCH 4/4] Name action more specifically and match example --- .../{go-action.yml => go-dependency-submission.yml} | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) rename .github/workflows/{go-action.yml => go-dependency-submission.yml} (75%) diff --git a/.github/workflows/go-action.yml b/.github/workflows/go-dependency-submission.yml similarity index 75% rename from .github/workflows/go-action.yml rename to .github/workflows/go-dependency-submission.yml index 4428d01..90b7bef 100644 --- a/.github/workflows/go-action.yml +++ b/.github/workflows/go-dependency-submission.yml @@ -1,18 +1,24 @@ -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: actions/go-dependency-submission@main with: