Skip to content

Commit

Permalink
Add action.yml as GitHub instructed.
Browse files Browse the repository at this point in the history
Update HashiCorps packer docker image to 1.5.4
Update readme with new instructions.
  • Loading branch information
dawitnida committed Feb 19, 2020
1 parent f5d81c0 commit 07b6917
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 3 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ Variables
- `TEMPLATE_FILE_NAME` : Packer template file
- `ACTION_COMMENT` : Enable/Disable PR comment from validate result

```
name: Validate packer template file in a directory
on:
pull_request:
jobs:
packer_validate:
runs-on: hashicorp/packer:1.5.4
steps:
- name: Packer validate template-y without argument
uses: dawitnida/packer-github-actions/validate@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TEMPLATE_FILE_NAME: ${{ env.TEMPLATE_FILE_NAME }}
```

```
workflow "packer build template-y" {
resolves = "packer-build-template-y"
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM hashicorp/packer:1.3.5
FROM hashicorp/packer:1.5.4

LABEL "com.github.actions.name" = "packer-build"
LABEL "com.github.actions.description" = "Build packer template file in a directory"
Expand Down
9 changes: 9 additions & 0 deletions build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: 'packer-build'
author: 'Dawit Nida <dawit@dawitnida.com>'
description: 'Build packer template file in a directory'
runs:
using: 'docker'
image: 'Dockerfile'
branding:
icon: 'circle'
color: 'blue'
2 changes: 1 addition & 1 deletion inspect/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM hashicorp/packer:1.3.5
FROM hashicorp/packer:1.5.4

LABEL "com.github.actions.name" = "packer-inspect"
LABEL "com.github.actions.description" = "Inspect packer template file in a directory"
Expand Down
9 changes: 9 additions & 0 deletions inspect/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: 'packer-inspect'
author: 'Dawit Nida <dawit@dawitnida.com>'
description: 'Inspect packer template file in a directory'
runs:
using: 'docker'
image: 'Dockerfile'
branding:
icon: 'alert-circle'
color: 'green'
2 changes: 1 addition & 1 deletion validate/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM hashicorp/packer:1.3.5
FROM hashicorp/packer:1.5.4

LABEL "com.github.actions.name" = "packer-validate"
LABEL "com.github.actions.description" = "Validate packer template file in a directory"
Expand Down
9 changes: 9 additions & 0 deletions validate/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: 'packer-validate'
author: 'Dawit Nida <dawit@dawitnida.com>'
description: 'Validate packer template file in a directory'
runs:
using: 'docker'
image: 'Dockerfile'
branding:
icon: 'alert-circle'
color: 'blue'

0 comments on commit 07b6917

Please sign in to comment.