forked from aws/aws-app-mesh-controller-for-k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (131 loc) · 5.85 KB
/
prod-release.yaml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: prod-release
on:
workflow_dispatch:
inputs:
tag:
description: "The tag for this release (must already be pushed)."
required: true
permissions:
contents: read
jobs:
prod-release:
name: prod-release
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Configure AWS Credentials (pull images)
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: us-west-2
role-to-assume: "${{ secrets.BETA_AWS_ROLE }}"
role-session-name: PullImages
- name: Pull Images To Region
shell: bash
env:
SRC: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com/amazon/appmesh-controller:${{ github.event.inputs.tag }}"
run: |
aws ecr get-login-password --region "us-west-2" | \
docker login --username AWS --password-stdin "${SRC}"
docker pull "${SRC}-linux_amd64"
docker pull "${SRC}-linux_arm64"
- name: Deploy Images To ECR Public
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "public.ecr.aws"
image_tag: "${{ github.event.inputs.tag }}"
dst_image_name: "appmesh/appmesh-controller"
region: "us-west-2"
role: "${{ secrets.PROD_AWS_ROLE }}"
- name: Deploy Images to PDX
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "${{ secrets.PROD_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
image_tag: "${{ github.event.inputs.tag }}"
region: "us-west-2"
role: "${{ secrets.PROD_AWS_ROLE }}"
- name: Deploy Images to BAH
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "${{ secrets.PROD_BAH_AWS_ACCOUNT }}.dkr.ecr.me-south-1.amazonaws.com"
image_tag: "${{ github.event.inputs.tag }}"
region: "me-south-1"
role: "${{ secrets.PROD_BAH_AWS_ROLE }}"
- name: Deploy Images to CPT
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "${{ secrets.PROD_CPT_AWS_ACCOUNT }}.dkr.ecr.af-south-1.amazonaws.com"
image_tag: "${{ github.event.inputs.tag }}"
region: "af-south-1"
role: "${{ secrets.PROD_CPT_AWS_ROLE }}"
- name: Deploy Images to HKG
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "${{ secrets.PROD_HKG_AWS_ACCOUNT }}.dkr.ecr.ap-east-1.amazonaws.com"
image_tag: "${{ github.event.inputs.tag }}"
region: "ap-east-1"
role: "${{ secrets.PROD_HKG_AWS_ROLE }}"
- name: Deploy Images to MXP
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "${{ secrets.PROD_MXP_AWS_ACCOUNT }}.dkr.ecr.eu-south-1.amazonaws.com"
image_tag: "${{ github.event.inputs.tag }}"
region: "eu-south-1"
role: "${{ secrets.PROD_MXP_AWS_ROLE }}"
- name: Deploy Images to CGK
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "${{ secrets.PROD_CGK_AWS_ACCOUNT }}.dkr.ecr.ap-southeast-3.amazonaws.com"
image_tag: "${{ github.event.inputs.tag }}"
region: "ap-southeast-3"
role: "${{ secrets.PROD_CGK_AWS_ROLE }}"
- name: Deploy Images to BJS
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "${{ secrets.PROD_BJS_AWS_ACCOUNT }}.dkr.ecr.cn-north-1.amazonaws.com.cn"
image_tag: "${{ github.event.inputs.tag }}"
region: "cn-north-1"
role: "${{ secrets.PROD_BJS_AWS_ROLE }}"
- name: Deploy Images to ZHY
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "${{ secrets.PROD_ZHY_AWS_ACCOUNT }}.dkr.ecr.cn-northwest-1.amazonaws.com.cn"
image_tag: "${{ github.event.inputs.tag }}"
region: "cn-northwest-1"
role: "${{ secrets.PROD_ZHY_AWS_ROLE }}"
- name: Deploy Images to TLV
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "${{ secrets.PROD_TLV_AWS_ACCOUNT }}.dkr.ecr.il-central-1.amazonaws.com"
image_tag: "${{ github.event.inputs.tag }}"
region: "il-central-1"
role: "${{ secrets.PROD_TLV_AWS_ROLE }}"
- name: Deploy Images to PDT
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "${{ secrets.PROD_PDT_AWS_ACCOUNT }}.dkr.ecr.us-gov-west-1.amazonaws.com"
image_tag: "${{ github.event.inputs.tag }}"
region: "us-gov-west-1"
role: "${{ secrets.PROD_PDT_AWS_ROLE }}"
- name: Deploy Images to OSU
uses: ./.github/actions/push-image
with:
src_host: "${{ secrets.BETA_AWS_ACCOUNT }}.dkr.ecr.us-west-2.amazonaws.com"
dst_host: "${{ secrets.PROD_OSU_AWS_ACCOUNT }}.dkr.ecr.us-gov-east-1.amazonaws.com"
image_tag: "${{ github.event.inputs.tag }}"
region: "us-gov-east-1"
role: "${{ secrets.PROD_OSU_AWS_ROLE }}"