Skip to content

Deploying Auth Server v806 to intg #825

Deploying Auth Server v806 to intg

Deploying Auth Server v806 to intg #825

Workflow file for this run

name: TDR Deploy Auth Server
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: 'Environment'
required: true
options:
- intg
- staging
- prod
default: 'intg'
to-deploy:
description: 'Version to deploy'
required: true
run-name: Deploying Auth Server ${{inputs.to-deploy}} to ${{inputs.environment}}
permissions:
id-token: write
contents: write
jobs:
deploy:
uses: nationalarchives/tdr-github-actions/.github/workflows/ecs_deploy.yml@main
with:
service: keycloak
image-name: auth-server
environment: ${{ github.event.inputs.environment }}
to-deploy: ${{ github.event.inputs.to-deploy }}
secrets:
ACCOUNT_NUMBER: ${{ secrets.ACCOUNT_NUMBER }}
MANAGEMENT_ACCOUNT: ${{ secrets.MANAGEMENT_ACCOUNT }}
WORKFLOW_PAT: ${{ secrets.WORKFLOW_PAT }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
push-update-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Configure AWS credentials from management account
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::${{ secrets.MANAGEMENT_ACCOUNT }}:role/TDRGithubActionsRoleMgmt
aws-region: eu-west-2
role-session-name: APIECRLogin
- name: Login to ECR
uses: docker/login-action@v1
with:
registry: ${{ secrets.MANAGEMENT_ACCOUNT }}.dkr.ecr.eu-west-2.amazonaws.com
- run: |
docker build --pull -f Dockerfile-update -t ${{ secrets.MANAGEMENT_ACCOUNT }}.dkr.ecr.eu-west-2.amazonaws.com/keycloak-update:${{ github.event.inputs.environment }} .
docker push ${{ secrets.MANAGEMENT_ACCOUNT }}.dkr.ecr.eu-west-2.amazonaws.com/keycloak-update:${{ github.event.inputs.environment }}