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

Provide example Workflow #2

Merged
merged 1 commit into from
May 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Provide example Action
  • Loading branch information
lseppala authored May 13, 2022
commit 68868b1cf9e701bb8a749decd77dd5e18db0b937
35 changes: 27 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,32 @@ An Action that creates a dependency submission using `go mod graph`.

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.

### Example
```
name: Run snapshot action
uses: @dsp-testing/go-snapshot-action
with:
# All of the below have defaults, but can be overriden manually
detector-name: go snapshot action
detector-url: ${{ github.server_url }}/${{ github.repository }}
detector-version: 1.0.0
metadata: '{"lastModified": "22-04-2022"}'
name: Go Action detection of dependencies
on:
push:
branches:
- main
# Envionment 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: @dsp-testing/go-snapshot-action
with:
# All of the below have defaults, but can be overriden manually
detector-name: go snapshot action
detector-url: ${{ github.server_url }}/${{ github.repository }}
detector-version: 1.0.0
metadata: '{"lastModified": "22-04-2022"}'
```