From fb48441e730c1feb72de282b21b5072465248388 Mon Sep 17 00:00:00 2001 From: Rufei Zhou Date: Mon, 7 Apr 2025 02:16:51 -0700 Subject: [PATCH] dont publish on output cache hit --- .gitea/workflows/refresh.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitea/workflows/refresh.yaml b/.gitea/workflows/refresh.yaml index 612f18a..85e4885 100755 --- a/.gitea/workflows/refresh.yaml +++ b/.gitea/workflows/refresh.yaml @@ -59,21 +59,33 @@ jobs: - name: Generate New Calendar Files run: poetry run generate-ics #---------------------------------------------- + # load cached venv if cache exists + #---------------------------------------------- + - name: Check if calendars have changed + id: cached-calendars + uses: actions/cache@v4 + with: + path: output + key: calendar-files-${{ hashFiles('outputs/**') }} + #---------------------------------------------- # publish artifacts and release #---------------------------------------------- - name: Archive production artifacts + if: steps.cached-calendars.outputs.cache-hit != 'true' uses: christopherhx/gitea-upload-artifact@v4 with: name: calendars path: | output/ - name: Zip up artifacts + if: steps.cached-calendars.outputs.cache-hit != 'true' uses: thedoctor0/zip-release@0.7.5 with: type: 'zip' filename: 'calendars.zip' path: output/ - name: Create new release + if: steps.cached-calendars.outputs.cache-hit != 'true' uses: akkuman/gitea-release-action@v1 with: name: ${{ steps.time.outputs.time }}