Skip to content

Commit

Permalink
v1.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dflook committed Oct 4, 2021
1 parent cb4e9a4 commit c5456d3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@ The [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

The token provided by GitHub Actions will work with the default permissions.
The minimum permissions are `pull-requests: write`.
It will also likely need `contents: read` so the job can checkout the repo.

You can also use a Personal Access Token which has the `repo` scope.
The GitHub user that owns the PAT will be the PR comment author.

- Type: string
- Optional

Expand Down Expand Up @@ -250,7 +257,7 @@ The [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/

The runtime environment for these actions is subject to change in minor version releases. If using this environment variable, specify the minor version of the action to use.

The runtime image is currently based on `debian:buster`, with the command run using `bash -xeo pipefail`.
The runtime image is currently based on `debian:bullseye`, with the command run using `bash -xeo pipefail`.

For example:
```yaml
Expand All @@ -276,6 +283,19 @@ The [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/
resources would change. With terraform >=0.13 this is correctly set to 'true' whenever an apply
needs to be run.

* `json_plan_path`

This is the path to the generated plan in [JSON Output Format](https://www.terraform.io/docs/internals/json-format.html)
The path is relative to the Actions workspace.

This is not available when using terraform 0.11 or earlier.
This also won't be set if the backend type is `remote` - Terraform does not support saving remote plans.

* `text_plan_path`

This is the path to the generated plan in a human readable format.
The path is relative to the Actions workspace.

## Example usage

### Automatically generating a plan
Expand Down
8 changes: 6 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ inputs:

outputs:
changes:
description: If the plan changes any resources - 'true' or 'false'
description: If the generated plan would update any resources or outputs this is set to `true`, otherwise it's set to `false`.
text_plan_path:
description: Path to a file in the workspace containing the generated plan in human readble format.
json_plan_path:
description: Path to a file in the workspace containing the generated plan in JSON format. This won't be set if the backend type is `remote`.

runs:
using: docker
image: docker://danielflook/terraform-github-actions@sha256:40842eb9f7e95f28573f82ebec653c15687f7b5b1c03a7b10e2c1de1d4a68e15
image: docker://danielflook/terraform-github-actions@sha256:987dcf3c288a803f37a3fb177d95d9d549d37beff8a5bd23c26390e4bae439e2
entrypoint: /entrypoints/plan.sh

branding:
Expand Down

0 comments on commit c5456d3

Please sign in to comment.