diff --git a/.github/workflows/test-action.yaml b/.github/workflows/test-action.yaml index 2d3d8d3..1d1a353 100644 --- a/.github/workflows/test-action.yaml +++ b/.github/workflows/test-action.yaml @@ -25,6 +25,6 @@ jobs: go-version: stable - run: go run main.go env: - INPUT_REQUIRED: | + INPUT_REQUIRED_WORKFLOW_PATTERNS: | - tests - INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + INPUT_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/action.yaml b/action.yaml index fe0b9af..30dac95 100644 --- a/action.yaml +++ b/action.yaml @@ -3,10 +3,16 @@ description: Define required checks inside your repository. author: "Rory Quinn" inputs: - github_token: - description: Required. + token: + description: GitHub token required_workflow_patterns: description: List of patterns to check. + target_sha: + description: Target SHA. + initial_delay_seconds: + description: Initial delay before polling. + poll_frequency_seconds: + description: Polling frequency. version: description: Release version of action to run. runs: diff --git a/index.js b/index.js index de6922a..0865679 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ const os = require('os') const process = require('process') const OwnerRepo = "RoryQ/required-checks" -const BinaryName = "required_checks" +const BinaryName = "required-checks" function logDebug(...data) { if (!!process.env.REQUIRED_CHECKS_DEBUG) { @@ -63,7 +63,7 @@ function determineVersion() { } function main() { - logDebug(process.env.INPUT_PATHS) + logDebug(process.env.INPUT_REQUIRED) logDebug("started") const versionTag = determineVersion() let status = downloadBinary(versionTag, chooseBinary(versionTag)) diff --git a/pkg/reqcheck/inputs/inputs.go b/pkg/reqcheck/inputs/inputs.go index 39aaba9..3c51e0c 100644 --- a/pkg/reqcheck/inputs/inputs.go +++ b/pkg/reqcheck/inputs/inputs.go @@ -2,18 +2,18 @@ package inputs const ( // Token required for the GitHub API - Token = "token" + Token = "TOKEN" // RequiredWorkflowPatterns is a yaml list of patterns to check - RequiredWorkflowPatterns = "required" + RequiredWorkflowPatterns = "REQUIRED_WORKFLOW_PATTERN" // InitialDelaySeconds Initial delay before polling - InitialDelaySeconds = "initial-delay-seconds" + InitialDelaySeconds = "INITIAL_DELAY_SECONDS" // PollFrequencySeconds Polling frequency - PollFrequencySeconds = "poll-frequency-seconds" + PollFrequencySeconds = "POLL_FREQUENCY_SECONDS" - TargetSHA = "target-sha" + TargetSHA = "TARGET_SHA" // Version release version of the action to run Version = "version"