diff --git a/README.md b/README.md index 7cbb3ca..abbc5a6 100644 --- a/README.md +++ b/README.md @@ -5,16 +5,24 @@ pull requests to review Packer template changes and potentially build on pull me Check out the [official Packer documentation][packer-doc] for further reference. -### TODOs +### DONE - Documentations - [x] Getting started & usage - - [ ] Actions details + - [x] Actions details - Action for - [x] Validate Action - - [ ] Inspect Action - - [ ] Build Action - - [ ] Directory set for all actions + - [x] Inspect Action + - [x] Build Action + - [x] Directory set for all actions + +### TODOs +- Improvements + - [ ] Multiple template validation + - [ ] Documentation with more screen shots & configuration instructions + - [ ] Licensing + - [ ] Blog post + ### Getting started and usage @@ -28,58 +36,46 @@ Variables - `ACTION_COMMENT` : Enable/Disable PR comment from validate result ``` -workflow "packer validate docker-image-template" { - resolves = "packer-validate-docker-image-template" - on = "pull_request" +workflow "packer build template-y" { + resolves = "packer-build-template-y" + on = "release" } -action "filter-open-synced-pr" { - uses = "actions/bin/filter@master" - args = "action 'opened|synchronize'" -} - -# For single template (eg. dockers dir contains *.json template) -action "packer-validate-docker-image-template" { - uses = "dawitnida/packer-github-actions/validate@master" - needs = "filter-open-synced-pr" +action "packer-build-template-y" { + uses = "dawitnida/packer-github-actions/build@master" + needs = "packer-inspect-template-y" secrets = [ "GITHUB_TOKEN", ] env = { - TEMPLATE_FILE_NAME = "*.json" - PACKER_ACTION_WORKING_DIR = "dockers" + TEMPLATE_FILE_NAME = "packer-template-y.json" } } -workflow "packer validate template-x with var-file" { - resolves = "packer-validate-template-x" +action "filter-open-synced-pr" { + uses = "actions/bin/filter@master" + args = "action 'opened|synchronize'" +} + +workflow "packer inspect & validate template-y" { + resolves = "packer-inspect-template-y" on = "pull_request" } -# For specific template file (eg. packer-template-x.json) with var-file (global-vars.json) arg -action "packer-validate-template-x" { +action "packer-validate-template-y" { uses = "dawitnida/packer-github-actions/validate@master" needs = "filter-open-synced-pr" secrets = [ "GITHUB_TOKEN", ] - args = [ - "-var-file=global-vars.json", - ] env = { - TEMPLATE_FILE_NAME = "packer-template-x.json" + TEMPLATE_FILE_NAME = "packer-template-y.json" } } -workflow "packer validate template-y without arg" { - resolves = "packer-validate-template-y" - on = "pull_request" -} - -# For specific template file (eg. packer-template-y.json) without any args -action "packer-validate-template-y" { - uses = "dawitnida/packer-github-actions/validate@master" - needs = "filter-open-synced-pr" +action "packer-inspect-template-y" { + uses = "dawitnida/packer-github-actions/inspect@master" + needs = "packer-validate-template-y" secrets = [ "GITHUB_TOKEN", ]