diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b381925..7d660a0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,6 +42,8 @@ jobs: deploy-staging: needs: [pre-build, build-test-push] uses: cyber-dojo/reusable-actions-workflows/.github/workflows/deploy.yml@master + secrets: + MERKELY_API_TOKEN: ${{ secrets.MERKELY_API_TOKEN }} with: tagged_image: 244531986313.dkr.ecr.eu-central-1.amazonaws.com/languages-start-points:${{ needs.pre-build.outputs.tag }} AWS_ACCOUNT_ID: 244531986313 @@ -49,14 +51,28 @@ jobs: gh_actions_iam_role_name: gh_actions_services environment_url: https://beta.cyber-dojo.org environment_name: staging + cyber_dojo_env_name: beta + cyber_dojo_env_name_aws: aws-beta + kosli_staging_host: https://staging.app.merkely.com + kosli_production_host: https://app.merkely.com + circle_sha1: ${{ github.sha }} + circle_build_url: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}} deploy-prod: needs: [pre-build, build-test-push, deploy-staging] uses: cyber-dojo/reusable-actions-workflows/.github/workflows/deploy.yml@master + secrets: + MERKELY_API_TOKEN: ${{ secrets.MERKELY_API_TOKEN }} with: tagged_image: 274425519734.dkr.ecr.eu-central-1.amazonaws.com/languages-start-points:${{ needs.pre-build.outputs.tag }} AWS_ACCOUNT_ID: 274425519734 AWS_REGION: eu-central-1 gh_actions_iam_role_name: gh_actions_services environment_url: https://prod.cyber-dojo.org - environment_name: production \ No newline at end of file + environment_name: production + cyber_dojo_env_name: prod + cyber_dojo_env_name_aws: aws-prod + kosli_staging_host: https://staging.app.merkely.com + kosli_production_host: https://app.merkely.com + circle_sha1: ${{ github.sha }} + circle_build_url: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}} diff --git a/deployment/terraform/gh_environments/main.tf b/deployment/terraform/gh_environments/main.tf deleted file mode 100644 index 65b1b2b..0000000 --- a/deployment/terraform/gh_environments/main.tf +++ /dev/null @@ -1,44 +0,0 @@ -terraform { - backend "s3" { - bucket = "terraform-state-9d7e951c290ec5bbe6506e0ddb064808764bc636" - key = "terraform/languages-start-points/gh_environments/main.tfstate" - dynamodb_table = "terraform-state-9d7e951c290ec5bbe6506e0ddb064808764bc636" - encrypt = true - } - required_providers { - github = { - source = "integrations/github" - version = "~> 4.28.0" - } - } -} - -# See auth details here https://registry.terraform.io/providers/integrations/github/latest/docs -provider "github" { - owner = "cyber-dojo" -} - -data "github_team" "production_deploy" { - slug = "production_deploy" -} - -resource "github_repository_environment" "staging" { - environment = "staging" - repository = var.repository_name - deployment_branch_policy { - protected_branches = false - custom_branch_policies = true - } -} - -resource "github_repository_environment" "production" { - environment = "production" - repository = var.repository_name - reviewers { - teams = [data.github_team.production_deploy.id] - } - deployment_branch_policy { - protected_branches = false - custom_branch_policies = true - } -} diff --git a/deployment/terraform/gh_environments/variables.tf b/deployment/terraform/gh_environments/variables.tf deleted file mode 100644 index 189700d..0000000 --- a/deployment/terraform/gh_environments/variables.tf +++ /dev/null @@ -1,4 +0,0 @@ -variable "repository_name" { - type = string - default = "languages-start-points" -}