Skip to content

Commit

Permalink
Merge pull request #236 from AppQuality/remove-questionmark-buttons-f…
Browse files Browse the repository at this point in the history
…rom-bug-form

chore(ci): update action to push repo
  • Loading branch information
cannarocks authored Jul 21, 2023
2 parents f23ff49 + e12c00d commit 194813c
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,29 @@ jobs:
echo "##[set-output name=tag;]$TAG"
id: extract_branch

- name: Docker ECR
uses: kciter/aws-ecr-action@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@13d241b293754004c80624b5567555c4a39ffbe3
with:
access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
account_id: ${{ secrets.AWS_ACCOUNT_ID }}
region: eu-west-1
repo: appq-register-page
tags: ${{ steps.extract_branch.outputs.tag }}
extra_build_args: --build-arg NPM_TOKEN=${{ secrets.NPM_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@aaf69d68aa3fb14c1d5a6be9ac61fe15b48453a2

- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: appq-register-page
IMAGE_TAG: ${{ steps.extract_branch.outputs.tag }}
run: |
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
docker build \
--build-arg NPM_TOKEN=${{ secrets.NPM_TOKEN }} \
-t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"

0 comments on commit 194813c

Please sign in to comment.