-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (57 loc) · 1.89 KB
/
deploy_to_aws.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: "Deploy latest code to AWS"
on:
workflow_call:
inputs:
environment:
description: 'The name of the environment we are deploying to'
required: true
type: string
secrets:
AWS_PIPELINE_REGION:
description: 'The AWS pipeline region'
required: true
AWS_PIPELINE_ACCESS_KEY:
description: 'The AWS pipeline access region'
required: true
AWS_PIPELINE_SECRET_KEY:
description: 'The AWS pipeline secret region'
required: true
AWS_PIPELINE_MAIN_NAME:
description: 'The AWS main pipeline name'
required: true
AWS_PIPELINE_SIDEKIQ_NAME:
description: 'The AWS sidekiq pipeline name'
required: true
concurrency:
group: deploy-${{ inputs.environment }}
jobs:
run-ci:
uses: ./.github/workflows/ci.yml
deploy-to-application:
runs-on: ubuntu-latest
needs:
- run-ci
environment:
name: ${{ inputs.environment }}
steps:
- name: Trigger AWS CodePipeline - main container
uses: Crown-Commercial-Service/ccs-aws-codepipeline-action@v1.1.10
with:
aws-region: ${{ secrets.AWS_PIPELINE_REGION }}
aws-access-key: ${{ secrets.AWS_PIPELINE_ACCESS_KEY }}
aws-secret-key: ${{ secrets.AWS_PIPELINE_SECRET_KEY }}
pipeline-name: ${{ secrets.AWS_PIPELINE_MAIN_NAME }}
deploy-to-sidekiq:
runs-on: ubuntu-latest
needs:
- run-ci
environment:
name: ${{ inputs.environment }}
steps:
- name: Trigger AWS CodePipeline - sidekiq container
uses: Crown-Commercial-Service/ccs-aws-codepipeline-action@v1.1.10
with:
aws-region: ${{ secrets.AWS_PIPELINE_REGION }}
aws-access-key: ${{ secrets.AWS_PIPELINE_ACCESS_KEY }}
aws-secret-key: ${{ secrets.AWS_PIPELINE_SECRET_KEY }}
pipeline-name: ${{ secrets.AWS_PIPELINE_SIDEKIQ_NAME }}