Skip to content
This repository was archived by the owner on Apr 18, 2020. It is now read-only.

Commit 656b3da

Browse files
committed
Added branch name to environment variables
1 parent 0368df0 commit 656b3da

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Include and configure this module in your Terraform configuration:
6161

6262
``` hcl
6363
module "github_ci" {
64-
source = "git::https://github.com/squidfunk/terraform-aws-github-ci.git"
64+
source = "github.com/squidfunk/terraform-aws-github-ci"
6565
6666
github_owner = "<owner>"
6767
github_repository = "<repository>"
@@ -149,8 +149,6 @@ of the default project which has the following configuration:
149149

150150
``` hcl
151151
resource "aws_codebuild_project" "codebuild" {
152-
count = "${length(var.codebuild_project) == 0 ? 1 : 0}"
153-
154152
name = "${var.github_repository}"
155153
156154
build_timeout = "5"
@@ -162,7 +160,7 @@ resource "aws_codebuild_project" "codebuild" {
162160
163161
auth {
164162
type = "OAUTH"
165-
resource = "..."
163+
resource = "${var.github_oauth_token}"
166164
}
167165
}
168166

aws-lambda/dist/push.zip

13 Bytes
Binary file not shown.

aws-lambda/dist/status.zip

0 Bytes
Binary file not shown.

aws-lambda/src/push.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,12 @@ export default (event, context, cb) => {
7979
sourceVersion: sha,
8080
environmentVariablesOverride: [
8181
{
82-
name: "GIT_COMMIT",
82+
name: "GIT_BRANCH",
8383
value: ref
84+
},
85+
{
86+
name: "GIT_COMMIT",
87+
value: sha
8488
}
8589
]
8690
}, err => {

0 commit comments

Comments
 (0)