-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (34 loc) · 1.17 KB
/
update.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
name: TDR Update Auth Server Configuration
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment'
required: true
default: 'intg'
update-policy:
description: 'The update policy'
required: true
default: "SKIP"
permissions:
id-token: write
jobs:
update:
environment: ${{ github.event.inputs.environment }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: role-name
run: |
import os
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh:
print(f"role-name=TDRGitHubRunKeycloakUpdateRole{'${{ github.event.inputs.environment }}'.title()}", file=fh)
shell: python
- uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_NUMBER }}:role/${{ steps.role-name.outputs.role-name }}
aws-region: eu-west-2
role-session-name: RunKeycloakUpdateTask
- run: |
pip install boto3
python .github/scripts/run_ecs_task.py ${{ secrets.ACCOUNT_NUMBER }} ${{ github.event.inputs.environment }} ${{ github.event.inputs.update-policy }}