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

Use Action default token #1

Merged
merged 1 commit into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Go Snapshot Action

An action that creates a dependency submission using `go mod graph`.
An Action that creates a dependency submission using `go mod graph`.

To configure, you'll need to provide a GitHub token. Additional optional inputs include: `detector-name`, `detector-url`, `detector-version`, and `metadata` - a JSON of max eight keys to provide with the snapshot.
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.

```
name: Run snapshot action
uses: ./go-snapshot-action
uses: @dsp-testing/go-snapshot-action
with:
token: ${{ secrets.GITHUB_TOKEN }}
# 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"}'
```
```
5 changes: 3 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ description: 'Detects go dependencies in projects using go mod graph utility'
author: 'lorenanicole'
inputs:
token:
required: true
description: 'Personal access token for the GitHub API'
description: "GitHub Personal Access Token (PAT). Defaults to PAT provided by Action runner"
required: false
default: ${{ github.token }}
detector-name:
required: false
description: 'Name of the detector running the go action e.g. Go Snapshot Detector'
Expand Down