Skip to content

Release 180

Release 180 #11

Workflow file for this run

name: Upload Release to ECR dev
#concurrency: upload_to_ecr
on:
release:
branches: [ "*" ]
types:
- created
jobs:
upload:
runs-on: ubuntu-latest
name: Upload new Release to ECR
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS credentials in dev
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_DEV }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_DEV }}
aws-region: eu-west-2
- name: Login to ECR in dev
id: login-ecr-dev
uses: aws-actions/[email protected]
- name: Build & Push Image to ECR in dev
env:
ECR_REGISTRY_DEV: ${{ steps.login-ecr-dev.outputs.registry }}
ECR_REPOSITORY_DEV: beis
IMAGE_TAG_DEV: latest
run: |
docker build -t $ECR_REGISTRY_DEV/$ECR_REPOSITORY_DEV:$IMAGE_TAG_DEV --build-arg BUILD_NUMBER=${{ github.run_number }} --build-arg GIT_REF=$(git log -n 1 | awk '{print $2; exit}') .
docker push $ECR_REGISTRY_DEV/$ECR_REPOSITORY_DEV:$IMAGE_TAG_DEV
aws ecs update-service --force-new-deployment --service ecs_webserver --cluster ecs_webserver