From b6697cb555b47c15f0ceca69576d271800088b7e Mon Sep 17 00:00:00 2001 From: ignis Date: Tue, 2 Jun 2026 02:16:01 +0000 Subject: [PATCH] ci: fix APT cache redundant uploads with lowercase keys and conditional save --- .forgejo/workflows/deploy-docs.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/deploy-docs.yml b/.forgejo/workflows/deploy-docs.yml index 1dabfa8..0e43d15 100644 --- a/.forgejo/workflows/deploy-docs.yml +++ b/.forgejo/workflows/deploy-docs.yml @@ -14,13 +14,14 @@ jobs: # 1. 기존 APT 캐시 복원 (가장 최근 상태 불러오기) - name: Restore APT Cache + id: restore-apt uses: actions/cache/restore@v4 with: path: /var/cache/apt/archives # 매칭되지 않는 임시 키를 사용하여 항상 restore-keys가 작동하도록 유도 - key: ${{ runner.os }}-apt-temp + key: linux-apt-temp restore-keys: | - ${{ runner.os }}-apt- + linux-apt- # 2. 시스템 패키지 설치 및 구버전 찌꺼기 청소 - name: Install System Packages @@ -52,20 +53,21 @@ jobs: # 4. 계산된 해시값을 Key로 캐시 저장 - name: Save APT Cache + if: steps.restore-apt.outputs.cache-matched-key != format('linux-apt-{0}', steps.apt-hash.outputs.hash) uses: actions/cache/save@v4 with: path: /var/cache/apt/archives # 내용물에 변화가 없으면 해시가 동일하므로 업로드를 자동으로 건너뜁니다 (Skip) - key: ${{ runner.os }}-apt-${{ steps.apt-hash.outputs.hash }} + key: linux-apt-${{ steps.apt-hash.outputs.hash }} - name: Cache Python Virtual Environment id: cache-venv uses: actions/cache@v4 with: path: venv - key: ${{ runner.os }}-venv-${{ hashFiles('requirements.txt') }} + key: linux-venv-${{ hashFiles('requirements.txt') }} restore-keys: | - ${{ runner.os }}-venv- + linux-venv- - name: Install Python Requirements if: steps.cache-venv.outputs.cache-hit != 'true'