From ce8190492a206bfe6321cc02e17c0855b3193d54 Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 9 Sep 2024 19:59:54 -0700 Subject: [PATCH] Fix cloudformation build --- .aws/pondo-bot-stack.yml | 8 ++++++-- .github/workflows/main-branch.yml | 2 +- .github/workflows/provision-bot.yml | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.aws/pondo-bot-stack.yml b/.aws/pondo-bot-stack.yml index 0281ef09..fea7eeac 100644 --- a/.aws/pondo-bot-stack.yml +++ b/.aws/pondo-bot-stack.yml @@ -13,6 +13,10 @@ Parameters: Description: The latest image tag to be used for the Docker image Type: String Default: tag + BranchName: + Description: The branch name of the GitHub repository + Type: String + Default: main Resources: PondoInstanceProfile: @@ -23,7 +27,7 @@ Resources: PondoBotInstance: Type: 'AWS::EC2::Instance' Properties: - InstanceType: 'c6a.2xlarge' + InstanceType: 'c6a.large' IamInstanceProfile: !Ref PondoInstanceProfile ImageId: !Ref PondoBotAMIId SecurityGroupIds: @@ -48,7 +52,7 @@ Resources: docker run -d --restart always -p 80:80 -p 443:443 ${PondoBotRepository}:${LatestTag} Tags: - Key: Name - Value: PondoBotInstance + Value: !Join ['', ['PondoBot-', !Ref 'BranchName']] - Key: AccessControl Value: PondoBot diff --git a/.github/workflows/main-branch.yml b/.github/workflows/main-branch.yml index 4d010cd9..665090e0 100644 --- a/.github/workflows/main-branch.yml +++ b/.github/workflows/main-branch.yml @@ -16,7 +16,7 @@ jobs: environment: Mainnet region: 'us-east-2' github_actions_role: 'pondo-bot-role' - network: 'TestnetV0' + network: 'MainnetV0' rpc_url: 'https://mainnet.aleorpc.com' client_url: 'https://mainnet.aleorpc.com' epoch_blocks: '80888' diff --git a/.github/workflows/provision-bot.yml b/.github/workflows/provision-bot.yml index 3da18c4d..098cfedc 100644 --- a/.github/workflows/provision-bot.yml +++ b/.github/workflows/provision-bot.yml @@ -132,4 +132,5 @@ jobs: capabilities: 'CAPABILITY_NAMED_IAM' no-fail-on-empty-changeset: "1" parameter-overrides: >- - LatestTag=${{ steps.rename-pondo-bot-image.outputs.pondo-bot-image-tag }} \ No newline at end of file + LatestTag=${{ steps.rename-pondo-bot-image.outputs.pondo-bot-image-tag }} + BranchName=${{ env.BRANCH_NAME }} \ No newline at end of file