diff --git a/Dockerfile b/Dockerfile index 63242ca..d53348a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,19 @@ -FROM hashicorp/terraform:0.12.12 +FROM alpine:latest -LABEL "com.github.actions.name"="terraform validate" -LABEL "com.github.actions.description"="Validate the terraform files in a directory" -LABEL "com.github.actions.icon"="alert-triangle" -LABEL "com.github.actions.color"="purple" +LABEL "maintainer"="Igor Souza " -LABEL "repository"="https://github.com/hashicorp/terraform-github-actions" -LABEL "homepage"="http://github.com/hashicorp/terraform-github-actions" -LABEL "maintainer"="HashiCorp Terraform Team " +LABEL "com.github.actions.name"="Get Branch Name" +LABEL "com.github.actions.description"="Set a environment variable called BRANCH_NAME with the current branch name" +LABEL "com.github.actions.icon"="activity" +LABEL "com.github.actions.color"="red" +LABEL "repository"="https://github.com/igordcsouza/github-action-get-branch-name" +LABEL "homepage"="https://github.com/igordcsouza/github-action-get-branch-name" + +RUN apk add --no-cache \ + bash \ + ca-certificates \ + curl \ + jq RUN apk --update --no-cache add jq curl bash diff --git a/README.md b/README.md index d854653..a154ff5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# Terraform Validate Action -Runs `terraform validate` to validate the terraform files in a directory. +# Set Branch name as env var -See [https://www.terraform.io/docs/github-actions/actions/validate.html](https://www.terraform.io/docs/github-actions/actions/validate.html). +Variables needed `TOKEN` with a valid `github_token`! + +The environment name used to set the branch name is `BRANCH_NAME` \ No newline at end of file