diff --git a/README.md b/README.md index e27594e..ac36d12 100644 --- a/README.md +++ b/README.md @@ -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. +

+ +

+ +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 @@ -111,13 +117,12 @@ 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 @@ -125,5 +130,5 @@ jobs: - name: terraform plan uses: dflook/terraform-plan@v1 with: - path: my-terraform-cofnig + path: my-terraform-config ``` diff --git a/action.yaml b/action.yaml index 9901a3a..52552ad 100644 --- a/action.yaml +++ b/action.yaml @@ -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: diff --git a/plan.png b/plan.png new file mode 100644 index 0000000..fa662bc Binary files /dev/null and b/plan.png differ