Repository navigation
GHCR: Actions에서 이미지 빌드, 서버는 pull만 - #22
Merged
Merged
Conversation
The server no longer builds: image.yml publishes ghcr.io/jonpark0/<name> with the tags main and sha-<commit>, and compose names that image (build stays for local work). IMAGE_TAG=sha-<commit> runs an earlier build.
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.
main에 push되면 GitHub Actions가 Docker 이미지를 빌드해 GHCR에 올리고(
main,sha-<커밋>태그), 서버는docker compose pull로 받아 실행만 합니다. PR에서는 빌드만 하고 올리지 않습니다..github/workflows/image.yml: buildx + GHA 캐시, 액션은 커밋 SHA로 고정docker-compose.yml:image: ghcr.io/jonpark0/<이름>:${IMAGE_TAG:-main}추가.build는 로컬 작업용으로 남김. 되돌릴 때는IMAGE_TAG=sha-<커밋> docker compose up -d --no-builddiun.enable: "false"서버 쪽: 패키지가 비공개이므로 서버에서
docker login ghcr.io(read:packages 토큰)가 한 번 필요합니다.