🔀 워크플로를 기본 브랜치 하나로 모읍니다 (145곳) - #42
Merged
Merged
Conversation
이 저장소는 두 브랜치로 나뉘어 돌았습니다. 워크플로 파일과 스케줄 정의는
기본 브랜치(latest)에서 읽히는데, 체크아웃·푸시·트리거 필터는 작업
브랜치를 가리켰습니다. 같은 워크플로가 "어느 쪽 코드를 실행하고 어디에
결과를 쓰는가"가 갈렸고, 오늘 하루에만 이런 일이 났습니다.
· image-backfill을 수동 실행하려 했으나 기본 브랜치에 파일이 없어 404
· 감사가 발행 글 25장을 자체 호스팅 주소로 바꿔 커밋했는데 배포가
안 걸림 — workflow_run 필터가 latest 실행을 걸러냄. 라이브 글이
없는 파일을 가리킨 채 남았고 워크플로는 초록이었습니다
· 코드를 고쳐 latest에 머지해도 실행에는 반영되지 않아, 작업 브랜치로
되돌리는 동기화 PR을 6번 만들어야 했습니다
145곳을 latest로 옮겼습니다: ref 43, push 39, pull 36, 트리거 필터 16,
그 외 11 (reset --hard, HEAD:푸시, DASH_BRANCH, dispatch ref, 주석).
순서가 중요해서 먼저 처리한 것
──────────────────────────────
docs/images의 이미지 115개가 작업 브랜치에만 있었습니다. Pages가 그
브랜치를 체크아웃해 서빙하므로, 순서를 바꿔 배포 대상만 먼저 옮겼다면
발행 글 437편의 이미지가 전부 404가 됐을 것입니다. PR #41로 latest에
115개를 모두 올린 뒤에 이 변경을 합니다.
test_branch_targets.py가 두 가지를 지킵니다 — 옛 브랜치를 가리키는 줄이
남아 있지 않은지, 그리고 체크아웃 대상과 푸시 대상이 어긋나지 않는지.
셸 변수·표현식은 실행 시점에 정해지므로 검사에서 제외합니다.
테스트 967개 통과 (신규 135개 — 워크플로마다 검사).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RgLYqM9puPW1aqHTccbX69
Kevinlee7250
marked this pull request as ready for review
August 25, 2026 15:41
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.
문제
워크플로 파일과 스케줄 정의는 기본 브랜치(
latest) 에서 읽히는데, 체크아웃·푸시·트리거 필터는 작업 브랜치를 가리켰습니다. 같은 워크플로가 "어느 쪽 코드를 실행하고 어디에 결과를 쓰는가"가 갈렸습니다.오늘 하루에만 이런 일이 났습니다.
image-backfill수동 실행이 404workflow_run필터가latest실행을 걸러냄 — 워크플로는 초록변경
145곳을
latest로 이관했습니다.ref:(체크아웃)git push origingit pull --rebasebranches:reset --hard,HEAD:푸시,DASH_BRANCH, dispatchref, 주석)순서가 중요했습니다
docs/images의 이미지 115개가 작업 브랜치에만 있었습니다. Pages가 그 브랜치를 체크아웃해 서빙하므로, 배포 대상만 먼저 옮겼다면 발행 글 437편의 이미지가 전부 404가 됐을 것입니다.PR #41로
latest에 115개를 모두 올린 뒤에 이 변경을 합니다. 확인했습니다 —latest의docs/images에 115개 존재.재발 방지
test_branch_targets.py가 두 가지를 지킵니다.셸 변수·
${{ }}표현식은 실행 시점에 정해지므로 검사에서 제외합니다. 탐지기가 헛돌지 않는 것(옛 브랜치 문자열을 실제로 잡는지)도 확인했습니다.검증
머지 후 확인할 것
첫 워크플로 실행이
latest에 결과를 커밋하는지, 그리고 Pages가 계속 이미지를 서빙하는지 확인하겠습니다.🤖 Generated with Claude Code
https://claude.ai/code/session_01RgLYqM9puPW1aqHTccbX69
Generated by Claude Code