-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added locals support and GitHub Actions
- Loading branch information
1 parent
781fb35
commit 239da7d
Showing
8 changed files
with
160 additions
and
23 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: pr | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.15 | ||
id: go | ||
- name: Code checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Test | ||
run: go test -v -race ./... | ||
|
||
- name: Lint | ||
uses: golangci/golangci-lint-action@v2 |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: release | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} |
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
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
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,20 +1,24 @@ | ||
//Mock Terraform Configuration File | ||
resource "aws_eip" "nat" { | ||
vpc = true | ||
count = "${length(var.public_subnets)}" | ||
count = length(var.public_subnets) | ||
tags { | ||
Name = local.name_internal | ||
Env = "${local.env}-env" | ||
} | ||
} | ||
|
||
resource "aws_nat_gateway" "nat" { | ||
allocation_id = "${element(aws_eip.nat.*.id, count.index)}" | ||
subnet_id = "${element(aws_subnet.public.*.id, count.index)}" | ||
allocation_id = element(aws_eip.nat.*.id, count.index) | ||
subnet_id = element(aws_subnet.public.*.id, count.index)}" | ||
count = "${length(var.public_subnets)}" | ||
} | ||
|
||
data "template_file" "template1" { | ||
template = "${file("${path.module}/template1.tpl")}" | ||
template = file("${path.module}/template1.tpl") | ||
vars { | ||
t1_var1 = "${var.t1_var1}" | ||
t1-var2 = "${var.t1-var2}" | ||
t1-var2 = var.t1-var2 | ||
t1-var3 = "${var.t1-Var3}-${var.t1-inline}" | ||
} | ||
} |
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
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
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