Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Commit

Permalink
Updated environment to be services instead
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronwilliamsv1 committed Nov 6, 2023
1 parent 7178503 commit 00bbf53
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/copilot_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ jobs:
contents: read # This is required for actions/checkout
secrets:
AWS_ACCOUNT: ${{ secrets.AWS_ACCOUNT }}
uses: ./.github/workflows/environment.yml
uses: ./.github/workflows/copilot_service.yml
with:
workspace: 'dev'
copilot_environment: 'dev'

test_copilot_deploy:
if: inputs.environment == 'test' || inputs.environment == ''
Expand All @@ -73,9 +73,9 @@ jobs:
contents: read # This is required for actions/checkout
secrets:
AWS_ACCOUNT: ${{ secrets.AWS_ACCOUNT }}
uses: ./.github/workflows/environment.yml
uses: ./.github/workflows/copilot_service.yml
with:
workspace: 'test'
copilot_environment: 'test'

# Allow the capability to override UAT with another branch, but ideally uat and production should be in sync as much as possible
uat_copilot_deploy:
Expand All @@ -87,9 +87,9 @@ jobs:
contents: read # This is required for actions/checkout
secrets:
AWS_ACCOUNT: ${{ secrets.AWS_ACCOUNT }}
uses: ./.github/workflows/environment.yml
uses: ./.github/workflows/copilot_service.yml
with:
workspace: 'uat'
copilot_environment: 'uat'

# Only run this if the branch being deployed is main
production_copilot_deploy:
Expand All @@ -101,9 +101,9 @@ jobs:
contents: read # This is required for actions/checkout
secrets:
AWS_ACCOUNT: ${{ secrets.AWS_ACCOUNT }}
uses: ./.github/workflows/environment.yml
uses: ./.github/workflows/copilot_service.yml
with:
workspace: 'production'
copilot_environment: 'production'

post_deploy_tests:
needs: test_copilot_deploy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Environment Deployment
name: Copilot Service Deployment
on:
workflow_call:
inputs:
workspace:
copilot_environment:
required: true
type: string

Expand All @@ -13,7 +13,7 @@ on:
jobs:
copilot_deploy:
runs-on: ubuntu-latest
environment: ${{ inputs.workspace }}
environment: ${{ inputs.copilot_environment }}
steps:
- name: Git clone the repository
uses: actions/checkout@v3
Expand All @@ -26,7 +26,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT }}:role/GithubCopilotDeploy
role-session-name: NOTIFICATION_${{ inputs.workspace }}_COPILOT_${{ steps.currentdatetime.outputs.datetime }}
role-session-name: NOTIFICATION_${{ inputs.copilot_environment }}_COPILOT_${{ steps.currentdatetime.outputs.datetime }}
aws-region: eu-west-2

- name: Install AWS Copilot CLI
Expand All @@ -41,7 +41,7 @@ jobs:
run: |
yq -i '.image.location = "ghcr.io/communitiesuk/funding-service-design-notification:${{ github.ref_name == 'main' && 'latest' || github.ref_name }}"' copilot/fsd-notification/manifest.yml
- name: Copilot ${{ inputs.workspace }} deploy
- name: Copilot ${{ inputs.copilot_environment }} deploy
id: deploy_build
run: |
copilot svc deploy --env ${{ inputs.workspace }}
copilot svc deploy --env ${{ inputs.copilot_environment }}

0 comments on commit 00bbf53

Please sign in to comment.