Skip to content

This action provides a uniform interface for job input parameters

License

Notifications You must be signed in to change notification settings

castlabs/input-parameters-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Input Parameters Action

This action provides a uniform interface for job input parameters whether the job has been triggerered from a workflow_dispatch event or from a pull_request_review_commentevent. In the latter case, input parameters must be provided JSON-formatted in the review comment body, after a configurable prefix.

The parameters are exposed as outputs, together with valid-trigger true/false string that will be true unless the job was triggered from a review comment that does not start with the configured prefix.

Inputs

Name Description
line-prefix A previx that will identify a comment as triggering a workflow

Outputs

Name Description
* The other input parameters

Example usage

on:
  workflow_dispatch:
     inputs:
      clean-workspace:
        description: 'Cleans the workspace before git checkout'
        type: boolean
        required: false
...
- uses: castlabs/[email protected]
  id: parameters
  with:
    line-prefix: '/workflow'

- name: Clean workspace
  if: ${{ steps.parameters.outputs.clean-workspace == 'true' }}
  run: rm -rf *

About

This action provides a uniform interface for job input parameters

Resources

License

Stars

Watchers

Forks

Packages

No packages published