Skip to content

Commit

Permalink
ci:(wf) add app runner build
Browse files Browse the repository at this point in the history
  • Loading branch information
masamarux committed Jul 23, 2024
1 parent 0e978ee commit 71ea61e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,28 @@ jobs:
uses: aws-actions/amazon-ecr-login@v2

- name: Build docker image
id: build-docker-image
env:
REGISTRY: ${{steps.login-ecr.outputs.registry}}
TAG: ${{ steps.generate_tag.outputs.sha }}
run: |
docker build -t $REGISTRY/masa-ci:$TAG .
docker push $REGISTRY/masa-ci:$TAG
IMAGE=$(echo $REGISTRY/masa-ci:$TAG)
echo "image=${IMAGE}" >> $GITHUB_OUTPUT
- name: Deploy
env:
IMAGE: ${{ steps.build-docker-image.outputs.IMAGE }}
uses: awslabs/amazon-app-runner-deploy@main
with:
service: masa-api
access-role-arn: arn:aws:iam::961957158866:role/app-runner-role
region: us-east-2
cpu: 1
memory: 1
port: 3000
image: $IMAGE

# - name: Push image
# run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/masa-api:${{ steps.generate_tag.outputs.sha }}

0 comments on commit 71ea61e

Please sign in to comment.