Open
Conversation
Collaborator
Author
|
문제 : CI 속도가 너무 느림
코드 보기name: CI for Main Server
on:
push:
branches:
- be-main/dev
- be-main/dev/**
pull_request:
branches:
- be-main/dev
- be-main/dev/**
jobs:
build-and-push:
runs-on: ubuntu-latest
env:
SERVER_NAME: main
DOCKERFILE_DIR: src/backend/main-server/main
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'temurin'
cache: gradle
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Docker image with Cache
uses: docker/build-push-action@v5
with:
context: ${{ env.DOCKERFILE_DIR }}
file: ${{ env.DOCKERFILE_DIR }}/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.SERVER_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
해당 사항 (중복 선택)
설명
🔗 관련 이슈
해결한 이슈: closed #263
📝 작업 내용
DOCKERHUB_USERNAMEDOCKERHUB_TOKEN📸 스크린샷(optional)
DockerHub에 성공적으로 메인 서버의 이미지가 업로드 됨
test 브랜치를 통해 CI 파일 테스트 결과