Skip to content

pinpoint용 docker 이미지 생성하기 #30

pinpoint용 docker 이미지 생성하기

pinpoint용 docker 이미지 생성하기 #30

name: Continuous Deployment With Docker
on:
push:
branches:
- master
paths:
- my-garden-be/**
- my-garden-fe/**
pull_request:
branches:
- master
env:
# GitHub Container Registry에 푸시할 이미지 정보 (ACTOR: GitHub 사용자명 / DOCKER_IMAGE: 이미지명 / NAME: 컨테이너명)
# DOCKER_IMAGE를 만들때는 대문자가 포함되어서는 안됨, ACTOR에는 대문자가 포함되어도 상관없지만, 통일성을 위해 소문자로 작성 => 본인 계정에 맞게 변경해서 사용할 것
ACTOR: denia-park
DOCKER_IMAGE: ghcr.io/denia-park/my-garden/pinpoint
NAME: my-garden
jobs:
# build:
# name: Build
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Set up JDK 17
# uses: actions/setup-java@v4
# with:
# java-version: '17'
# distribution: 'temurin'
#
# - name: Grant execute permission for gradlew
# run: chmod +x my-garden-be/gradlew
#
# - name: Setup Gradle
# uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0
#
# # node_modules 캐시 체크
# - name: Check node modules cache
# id: cache
# uses: actions/cache@v4
# with:
# path: '**/node_modules'
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-
#
# - name: Build with Gradle Wrapper (skip npm install)
# if: steps.cache.outputs.cache-hit == 'true'
# run: ./gradlew build -x npmInstall
# working-directory: ./my-garden-be
#
# - name: Build with Gradle Wrapper (npm install)
# if: steps.cache.outputs.cache-hit != 'true'
# run: ./gradlew build
# working-directory: ./my-garden-be
#
# # docker buildx 설치
# - name: Set up docker buildx
# uses: docker/setup-buildx-action@v3
#
# # GitHub Container Registry에 로그인
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ env.ACTOR }}
# password: ${{ secrets.GITHUB_TOKEN }}
#
# # Docker Image 빌드 & GitHub Container Registry에 푸시
# - name: Build and push
# uses: docker/build-push-action@v5
# with:
# context: .
# push: true
# tags: ${{ env.DOCKER_IMAGE }}:latest
deploy:

Check failure on line 81 in .github/workflows/continuous-deployment.yml

View workflow run for this annotation

GitHub Actions / Continuous Deployment With Docker

Invalid workflow file

The workflow is not valid. .github/workflows/continuous-deployment.yml (Line: 81, Col: 3): The workflow must contain at least one job with no dependencies.
name: Deploy
needs: build # build 후에 실행되도록 정의
runs-on: [ self-hosted, gardener ] # AWS ./configure에서 사용할 label명
steps:
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ env.ACTOR }}
password: ${{ secrets.GITHUB_TOKEN }}
# 조건부 실행을 위해 컨테이너가 존재하는지 확인 -> 중지, 삭제 (이미지 포함) -> 새로운 이미지로 실행
- name: Docker run
run: |
docker pull ghcr.io/denia-park/my-garden/pinpoint:latest