Skip to content

Create docker-publish-result.yml #6

Create docker-publish-result.yml

Create docker-publish-result.yml #6

name: push vote image to ECR
on:
push:
branches:
- main
env:
AWS_REGION: us-east-1
ECR_REPOSITORY: vote
EKS_CLUSTER: votingapp-eks
jobs:
BUILD_AND_PUBLISH_VOTE:
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v4
- name: Build & Upload image to ECR
uses: appleboy/docker-ecr-action@master
with:
access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
registry: ${{ secrets.REGISTRY }}
repo: ${{ env.ECR_REPOSITORY }}
region: ${{ env.AWS_REGION }}
tags: latest,${{ github.run_number }}
daemon_off: false
dockerfile: ./vote/Dockerfile
context: ./vote