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 be40759 commit 638c0ac
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": "h-periodic",
"elasticbeanstalk_environment": "qa"
},
"staging": {
"github_environment_name": "Staging",
"github_environment_url": "https://my.papertrailapp.com/groups/38981358/events",
"aws_region": "us-west-1",
"elasticbeanstalk_application": "h-periodic",
"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 @@ -45,6 +45,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://my.papertrailapp.com/groups/38981358/events
aws_region: us-west-1
elasticbeanstalk_application: h-periodic
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 @@ -27,6 +30,18 @@ jobs:
elasticbeanstalk_application: h-periodic
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://my.papertrailapp.com/groups/38981358/events
aws_region: us-west-1
elasticbeanstalk_application: h-periodic
elasticbeanstalk_environment: staging
secrets: inherit
production:
name: Production
if: inputs.production
Expand Down

0 comments on commit 638c0ac

Please sign in to comment.