Skip to content

Merge pull request #202 from UKGovernmentBEIS/DineshKumarASD-patch-8 #17

Merge pull request #202 from UKGovernmentBEIS/DineshKumarASD-patch-8

Merge pull request #202 from UKGovernmentBEIS/DineshKumarASD-patch-8 #17

name: Upload Release to ECR preprod
#concurrency: upload_to_ecr
on:
release:
branches: [ "*" ]
types:
- created
jobs:
upload:
runs-on: ubuntu-latest
strategy:

Check failure on line 14 in .github/workflows/upload_preprod.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/upload_preprod.yml

Invalid workflow file

You have an error in your yaml syntax on line 14
matrix:
node-version: [18.3]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
name: Upload new Release to ECR
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS credentials in preprod
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_PREPROD }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_PREPROD }}
aws-region: eu-west-2
- name: Login to ECR in preprod
id: login-ecr
uses: aws-actions/[email protected]
- name: Build & Push Image to ECR in preprod
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: beis
IMAGE_TAG: latest
run: |
docker build --no-cache -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG --build-arg BUILD_NUMBER=${{ github.run_number }} --build-arg GIT_REF=$(git log -n 1 | awk '{print $2; exit}') .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
aws ecs update-service --force-new-deployment --service ecs_webserver --cluster ecs_webserver