Release 184 #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload Release to ECR test | |
#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 test | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_TEST }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_TEST }} | |
aws-region: eu-west-2 | |
- name: Login to ECR in test | |
id: login-ecr | |
uses: aws-actions/[email protected] | |
- name: Build & Push Image to ECR in test | |
env: | |
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
ECR_REPOSITORY: beis | |
IMAGE_TAG: latest | |
run: | | |
docker build -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 |