generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a25ba67
commit c2ef934
Showing
3 changed files
with
71 additions
and
0 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,29 @@ | ||
jobs: | ||
provision-ec2: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: '${{ secrets.TERRAFORM_AWS_KEY }}' | ||
aws-secret-access-key: '${{ secrets.TERRAFORM_AWS_SECRET }}' | ||
aws-region: us-east-2 | ||
- name: Setup Terraform | ||
uses: hashicorp/setup-terraform@v2 | ||
with: | ||
terraform_wrapper: false | ||
- name: Terraform Apply | ||
id: apply | ||
env: | ||
TF_VAR_ec2_name: "homeuniteus-ec2" | ||
run: | | ||
cd iac/ | ||
terraform fmt -recursive . | ||
terraform init | ||
terraform validate | ||
terraform plan | ||
terraform apply -auto-approve |
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,23 @@ | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
name: Generate Release | ||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: Release generated from ${{ github.ref }} | ||
draft: false | ||
prerelease: false |
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,19 @@ | ||
resource "aws_route53_zone" "main" { | ||
name = "homeunite.us" | ||
} | ||
|
||
resource "aws_route53_zone" "dev" { | ||
name = "dev.homeunite.us" | ||
|
||
tags = { | ||
Environment = "dev" | ||
} | ||
} | ||
|
||
resource "aws_route53_record" "dev-ns" { | ||
zone_id = aws_route53_zone.main.zone_id | ||
name = "dev.homeunite.us" | ||
type = "NS" | ||
ttl = "30" | ||
records = aws_route53_zone.dev.name_servers | ||
} |