Skip to content

Commit

Permalink
Merge pull request #3 from dawitnida/fix/validate-action-readme
Browse files Browse the repository at this point in the history
Added validate command instruction.
  • Loading branch information
dawitnida authored Apr 4, 2019
2 parents ea7a6d8 + 93ac334 commit 69fa546
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions validate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Packer Validate Action

Runs `packer validate *.json` on pull request to validate the syntax and configuration of a template file in a directory
If the validation fails, it will print out error as pull request comment.
Check out the [packer validate command][packer-validate-doc] for further reference.

## Usage

```
workflow "Packer" {
resolves = "packer-validate"
on = "pull_request"
}
action "filter-open-synced-pr" {
uses = "actions/bin/filter@master"
args = "action 'opened|synchronize'"
}
action "packer-validate" {
uses = "dawitnida/packer-github-actions/validate@master"
needs = "filter-open-synced-pr"
secrets = ["GITHUB_TOKEN"]
args = "*.json"
}
```

[packer-validate-doc]: <https://www.packer.io/docs/commands/validate.html>

0 comments on commit 69fa546

Please sign in to comment.