From 2334885d5fa3ea7f99b9442f597be2df4f3cc1c5 Mon Sep 17 00:00:00 2001 From: Roy Date: Tue, 12 May 2026 22:32:48 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EC=A4=91=EB=B3=B5=EB=90=9C=20sync-des?= =?UTF-8?q?ign-tokens.yml=20=ED=8F=90=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SWYP-Find/design-tokens 의 build.yml 이 zizizoi 스타일 자동 PR 흐름으로 확장되면서, 이 워크플로우는 동일한 일을 두 번 하는 형태가 됨. 새 흐름: - design-tokens 가 JSON 변경 감지 + Style Dictionary 검증 - design-tokens 가 Picke-iOS checkout + Tools/TokenGenerator.swift 실행 - design-tokens 가 develop 으로 자동 PR 생성 (peter-evans/create-pull-request) 이전 흐름(이 파일)은 repository_dispatch 또는 수동 실행으로 develop 에 직접 push. PR review 없이 직접 머지되는 단점과 함께 새 흐름과 중복. design-tokens PR 머지 + 첫 자동 PR 동작 확인 후 이 PR 을 머지할 것. --- .github/workflows/sync-design-tokens.yml | 67 ------------------------ 1 file changed, 67 deletions(-) delete mode 100644 .github/workflows/sync-design-tokens.yml diff --git a/.github/workflows/sync-design-tokens.yml b/.github/workflows/sync-design-tokens.yml deleted file mode 100644 index 4ea495e..0000000 --- a/.github/workflows/sync-design-tokens.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Sync Design Tokens - -on: - workflow_dispatch: - repository_dispatch: - types: [design-tokens-updated] - -concurrency: - group: sync-design-tokens - cancel-in-progress: true - -permissions: - contents: write - -env: - TOKENS_REPO: SWYP-Find/design-tokens - TOKENS_BRANCH: main - TOKENS_FILE: Mode 1.tokens.json - LOCAL_JSON_PATH: Projects/Shared/DesignSystem/Resources/Mode 1.tokens.json - TARGET_BRANCH: develop - -jobs: - sync: - runs-on: ubuntu-latest - steps: - - name: Checkout iOS repo - uses: actions/checkout@v5 - with: - ref: ${{ env.TARGET_BRANCH }} - fetch-depth: 0 - - - name: Setup Swift - uses: swift-actions/setup-swift@v2 - with: - swift-version: '5.10' - - - name: Download tokens JSON from design-tokens repo (public) - run: | - set -euo pipefail - ENCODED=$(python3 -c "import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1]))" "${TOKENS_FILE}") - curl -fsSL \ - "https://raw.githubusercontent.com/${TOKENS_REPO}/${TOKENS_BRANCH}/${ENCODED}" \ - -o "${LOCAL_JSON_PATH}" - echo "[sync] downloaded $(wc -c < "${LOCAL_JSON_PATH}") bytes" - - - name: Run TokenGenerator - run: swift Tools/TokenGenerator.swift - - - name: Commit and push directly to target branch - run: | - set -euo pipefail - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - # JSON 원본(LOCAL_JSON_PATH)은 design-tokens 레포가 단일 소스이므로 커밋하지 않음 - git add \ - "Projects/Shared/DesignSystem/Sources/Color/ShapeStyle+.swift" \ - "Projects/Shared/DesignSystem/Sources/Extension/CGFloat/CGFloat+Radius+.swift" \ - "Projects/Shared/DesignSystem/Sources/Extension/CGFloat/CGFloat+Spacing+.swift" \ - "Projects/Shared/DesignSystem/Sources/UI/Token/ComponentToken.swift" || true - if git diff --cached --quiet; then - echo "[sync] 변경사항 없음 — 커밋 건너뜀" - exit 0 - fi - git diff --cached --stat - git commit -m "chore: design-tokens 동기화 자동 코드젠 #24" - git push origin HEAD:${TARGET_BRANCH} - echo "[sync] ${TARGET_BRANCH} 에 직접 push 완료"