Skip to content

Commit

Permalink
Update deploy-ghr.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoDiazL authored Feb 16, 2024
1 parent 038dd1a commit 3572dcf
Showing 1 changed file with 74 additions and 17 deletions.
91 changes: 74 additions & 17 deletions .github/workflows/deploy-ghr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,81 @@ on:
branches: [ ghr ]


jobs:
deploy-bucket-only:
runs-on: ubuntu-latest
steps:
- name: Create deploy-bucket
id: bucket-deploy-bucket
uses: bitovi/[email protected]
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_SANDBOX}}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_SANDBOX}}
aws_default_region: us-east-1
ec2_instance_type: t2.medium
#jobs:
# deploy-bucket-only:
# runs-on: ubuntu-latest
# steps:
# - name: Create deploy-bucket
# id: bucket-deploy-bucket
# uses: bitovi/[email protected]
# with:
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_SANDBOX}}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_SANDBOX}}
# aws_default_region: us-east-1
# ec2_instance_type: t2.medium

stack_destroy: true
tf_state_bucket_destroy: true
# stack_destroy: true
# tf_state_bucket_destroy: true

repo_url: https://github.com/bitovi/devops-training-ec2-gha-example
repo_access_token: ${{ secrets.THIS_REPO_RUNNER_TOKEN }}
ec2_instance_public_ip: true
# repo_url: https://github.com/bitovi/devops-training-ec2-gha-example
# repo_access_token: ${{ secrets.THIS_REPO_RUNNER_TOKEN }}
# ec2_instance_public_ip: true
# ec2_user_data_file: user-data.sh

jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- id: deploy1
uses: bitovi/[email protected]
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_DEVELOPMENT }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_DEVELOPMENT }}
aws_default_region: us-east-1

additional_tags: '{\"some\":\"yes\"}'

aws_vpc_id: vpc-081abe910edab4281
aws_vpc_subnet_id: subnet-0f1b65df74adf6e87

ec2_instance_type: t3.medium
ec2_instance_public_ip: false
ec2_volume_size: 10
ec2_additional_tags: '{\"some\":\"ec2\"}'

repo_url: https://github.com/Bitovi/devops-trainin-ec2-gha-example
repo_access_token: ${{ secrets.THIS_REPO_RUNNER_TOKEN }}

stack_destroy: false
tf_state_bucket_destroy: true

aws_resource_identifier: kt-bitovi-test-resources-github-runner
tf_state_bucket: kt-bitovi-resources
tf_state_file_name_append: github-runner

- id: deploy2
uses: bitovi/github-actions-deploy-github-runner-to-ec2@main
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_DEVELOPMENT }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_DEVELOPMENT }}
aws_default_region: us-east-1

additional_tags: '{\"o2:phi\":\"yes\",\"o2:environment\":\"development\",\"terraform\":\"true\"}'

aws_vpc_id: vpc-081abe910edab4281
aws_vpc_subnet_id: subnet-0f1b65df74adf6e87

ec2_instance_type: t3.medium
ec2_instance_public_ip: false
ec2_volume_size: 10
ec2_additional_tags: '{\"some\":\"ec2\"}'

repo_url: https://github.com/Bitovi/devops-trainin-ec2-gha-example
repo_access_token: ${{ secrets.THIS_REPO_RUNNER_TOKEN }}

stack_destroy: false
tf_state_bucket_destroy: true

aws_resource_identifier: kt-bitovi-test-resources-github-runner
tf_state_bucket: kt-bitovi-resources
tf_state_file_name_append: github-runner

0 comments on commit 3572dcf

Please sign in to comment.