-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: repurpose to generic artifact upload (#5)
* feat: repurpose to generic artifact upload * chore: build Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
72982cc
commit 3267e8c
Showing
9 changed files
with
83 additions
and
5,046 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,23 @@ | ||
# terraform-upload-plan-action | ||
# Create Artifact Action | ||
|
||
This GitHub action parses and uploads the result of `terraform plan` for use with [terraform-plan-comment-action](https://github.com/theappnest/terraform-plan-comment-action). | ||
This GitHub action creates a file from a variable and uploads it to an artifact. | ||
|
||
## Usage | ||
|
||
```yaml | ||
jobs: | ||
modules: | ||
artifact: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: theappnest/terraform-monorepo-action@v1 | ||
id: modules | ||
outputs: | ||
modules: ${{ steps.modules.outputs.modules }} | ||
|
||
terraform: | ||
runs-on: ubuntu-latest | ||
needs: modules | ||
strategy: | ||
matrix: | ||
module: ${{ fromJson(needs.modules.outputs.modules) }} | ||
defaults: | ||
run: | ||
working-directory: ${{ matrix.module }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: hashicorp/setup-terraform@v1 | ||
- run: terraform init | ||
- run: terraform plan | ||
id: plan | ||
- uses: theappnest/terraform-upload-plan-action@v1 | ||
- uses: theappnest/create-artifact-action@v1 | ||
with: | ||
module: ${{ matrix.module }} | ||
plan: ${{ steps.plan.outputs.stdout }} | ||
|
||
comment: | ||
runs-on: ubuntu-latest | ||
needs: terraform | ||
steps: | ||
- uses: theappnest/terraform-plan-comment-action@v1 | ||
name: hello | ||
path: greetings/hello.md | ||
content: Hello World | ||
``` | ||
## Inputs | ||
- `name` (Optional) The name of the artifact to create. Defaults to `terraform-plan`. | ||
- `module` The name of the Terraform module. | ||
- `plan` The output of `terraform plan`. | ||
- `name` (Optional) The name of the artifact to create. Defaults to `artifact`. | ||
- `path` The path of the created file. | ||
- `content` The contents of the created file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.