Skip to content

Commit

Permalink
Add the staging environment(s) to [re]deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
seanh committed Jan 9, 2024
1 parent c8b7923 commit 5338780
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .cookiecutter/includes/.github/workflows/environments.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"elasticbeanstalk_application": "bouncer",
"elasticbeanstalk_environment": "qa"
},
"staging": {
"github_environment_name": "Staging",
"github_environment_url": "https://staging.hyp.is/FiqzonGfEe2o-AfEssZXnw/en.wikipedia.org/wiki/Wikipedia:Terminal_Event_Management_Policy",
"aws_region": "us-west-1",
"elasticbeanstalk_application": "bouncer",
"elasticbeanstalk_environment": "staging"
},
"production": {
"needs": ["qa"],
"github_environment_name": "Production",
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ jobs:
elasticbeanstalk_environment: qa
docker_tag: ${{ needs.Docker_Hub.outputs.docker_tag }}
secrets: inherit
staging:
name: Staging
needs: [docker_hub]
uses: hypothesis/workflows/.github/workflows/deploy.yml@main
with:
operation: deploy
github_environment_name: Staging
github_environment_url: https://staging.hyp.is/FiqzonGfEe2o-AfEssZXnw/en.wikipedia.org/wiki/Wikipedia:Terminal_Event_Management_Policy
aws_region: us-west-1
elasticbeanstalk_application: bouncer
elasticbeanstalk_environment: staging
docker_tag: ${{ needs.Docker_Hub.outputs.docker_tag }}
secrets: inherit
production:
name: Production
needs: [docker_hub, qa]
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/redeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
qa:
type: boolean
description: Redeploy QA
staging:
type: boolean
description: Redeploy Staging
production:
type: boolean
description: Redeploy Production
Expand All @@ -24,6 +27,18 @@ jobs:
elasticbeanstalk_application: bouncer
elasticbeanstalk_environment: qa
secrets: inherit
staging:
name: Staging
if: inputs.staging
uses: hypothesis/workflows/.github/workflows/deploy.yml@main
with:
operation: redeploy
github_environment_name: Staging
github_environment_url: https://staging.hyp.is/FiqzonGfEe2o-AfEssZXnw/en.wikipedia.org/wiki/Wikipedia:Terminal_Event_Management_Policy
aws_region: us-west-1
elasticbeanstalk_application: bouncer
elasticbeanstalk_environment: staging
secrets: inherit
production:
name: Production
if: inputs.production
Expand Down

0 comments on commit 5338780

Please sign in to comment.