-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.86 KB
/
deploy_cedarproxy.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
name: Deploy Cedarproxy to Environment
on:
workflow_call:
inputs:
env:
required: true
type: string
force_cedarproxy:
required: true
type: boolean
default: true # Per EASI-4374, we want to force cedarproxy deployments in the event pipeline deployment is skipped/cancelled
env:
GIT_HASH: ${{ github.sha }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
ENV: ${{ inputs.env }}
permissions:
id-token: write
contents: read
jobs:
deploy_cedarproxy:
runs-on: ubuntu-latest
environment: ${{ inputs.env }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4.0.2
with:
role-to-assume: ${{ secrets.AWS_OIDC_ROLE_TO_ASSUME }}
aws-region: us-west-2
- name: Check for changes to cedarproxy folder
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
cedarproxy:
- 'pkg/cedar/core/gen/**'
- 'cedarproxy/**'
- name: Update ECS task definition and deploy Cedarproxy
if: ${{ steps.changes.outputs.cedarproxy == 'true' || inputs.force_cedarproxy == true }}
env:
ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }}
ECR_REPOSITORY: easi-cedarproxy
NEW_IMAGE_TAG: ${{ env.GIT_HASH }}
TASK_FAMILY: "easi-cedarproxy-${{ inputs.env }}"
ECS_CLUSTER: "${{ inputs.env }}-easi-app"
SERVICE_NAME: easi-cedarproxy
SECURITY_GROUP_NAME: "ecs-easi-cedarproxy-${{ inputs.env }}"
run: |
export TASK_REVISION=$(./scripts/update_ecs_task_definition.sh)
./scripts/deploy_ecs_service.sh
- name: Announce failure
if: ${{ failure() }}
run: |
./scripts/github-action-announce-broken-branch