Skip to content

fix: ci

fix: ci #2

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- "master"
env:
DOCKER_IMAGE: ghcr.io/dy-make/withme-ai-backend # ghcr에 업로드될 이미지 이름, format: ghcr.io/깃허브유저이름/이미지이름
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 # buildx 설정
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GHCR_PAT }}
- name: Build and push
uses: docker/build-push-action@v2 # build-push-action 사용
with:
context: .
push: true
tags: ${{ env.DOCKER_IMAGE }}:${{ github.run_id }},${{ env.DOCKER_IMAGE }}:latest
cache-from: type=gha # 여기서 gha 는 Guthub Actions 용 캐시를 의미합니다.
cache-to: type=gha,mode=max