Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dflook committed Jul 18, 2020
1 parent e8a7618 commit 8b5d2c7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

This is one of a suite of terraform related actions - find them at [dflook/terraform-github-actions](https://github.com/dflook/terraform-github-actions).

This actions generates and outputs a terraform plan to the workflow log.
This actions generates a terraform plan.
If the action is run on `pull_request` events it will add a comment on the PR containing the generated plan.

If the action is run on `pull_request` events it can additionally create
a comment on the PR with the generated plan. To use this ensure that the
`GITHUB_TOKEN` environment variable is set.
<p align="center">
<img src="plan.png" width="600">
</p>

The `GITHUB_TOKEN` environment variable is must be set for the PR comment to be added.
The action can be run on other events, which prints the plan to the workflow log.

The [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/tree/master/terraform-apply) action can be used to apply the generated plan.

## Inputs

Expand Down Expand Up @@ -111,19 +117,18 @@ name: PR Plan
on: [pull_request]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
plan:
runs-on: ubuntu-latest
name: Create terraform plan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: terraform plan
uses: dflook/terraform-plan@v1
with:
path: my-terraform-cofnig
path: my-terraform-config
```
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ outputs:

runs:
using: docker
image: docker://danielflook/terraform-github-actions:v1.1.0
image: docker://danielflook/terraform-github-actions:v1.2.0
entrypoint: /entrypoints/plan.sh

branding:
Expand Down
Binary file added plan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8b5d2c7

Please sign in to comment.