ci: cache packages after install

Instead of at end of workflow
This commit is contained in:
2 * r + 2 * t 2026-03-20 17:24:06 +11:00
parent 0766993fbc
commit cf81b3d915

View file

@ -9,8 +9,8 @@ runs:
shell: bash shell: bash
run: echo "week=$(date +%Y-%U)" >> $GITHUB_OUTPUT run: echo "week=$(date +%Y-%U)" >> $GITHUB_OUTPUT
- name: Cache packages - name: Restore package cache
uses: actions/cache@v4 uses: actions/cache/restore@v4
with: with:
path: /var/cache/pacman/pkg path: /var/cache/pacman/pkg
key: pacman-${{ steps.date.outputs.week }}-${{ hashFiles('.github/actions/setup-arch/action.yml') }} key: pacman-${{ steps.date.outputs.week }}-${{ hashFiles('.github/actions/setup-arch/action.yml') }}
@ -37,3 +37,9 @@ runs:
install_pkg cpptrace # Dep for qs install_pkg cpptrace # Dep for qs
install_pkg quickshell-git install_pkg quickshell-git
- name: Save packages to cache
uses: actions/cache/save@v4
with:
path: /var/cache/pacman/pkg
key: pacman-${{ steps.date.outputs.week }}-${{ hashFiles('.github/actions/setup-arch/action.yml') }}