Skip to content

Feat CI pipeline (#21) #3

Feat CI pipeline (#21)

Feat CI pipeline (#21) #3

Workflow file for this run

name: ci
on:
- push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-2
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build and push container image
id: docker_build
uses: docker/build-push-action@v6
with:
context: ./
file: ./Dockerfile
push: true
tags: ${{ steps.login-ecr.outputs.registry }}/dittodining:${{ github.sha }}
# private repo로 전환한다면 아래와 같이 GitHub access token이 필요
# build-args: |
# GH_ACCESS_TOKEN=${{ secrets.GH_ACCESS_TOKEN }}