diff --git a/.github/workflows/links-fail-fast.yml b/.github/workflows/links-fail-fast.yml index 94e1996ff86..080c861e4d2 100644 --- a/.github/workflows/links-fail-fast.yml +++ b/.github/workflows/links-fail-fast.yml @@ -13,7 +13,8 @@ jobs: - uses: actions/checkout@v4 - name: Restore lychee cache - uses: actions/cache@v4 + uses: actions/cache/restore@v4 + id: cache-restore with: path: .lycheecache key: cache-lychee-${{ github.sha }} @@ -25,4 +26,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: fail: true - args: --max-concurrency 5 --cache --max-cache-age 1d . + args: --max-concurrency 5 --cache --max-cache-age 1d --cache-exclude-status 300..=599 . + + - name: Save lychee cache + if: always() + uses: actions/cache/save@v4 + with: + path: .lycheecache + key: ${{ steps.cache-restore.outputs.cache-primary-key }} diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 83c3b61b892..f96559ccdcd 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -18,7 +18,8 @@ jobs: - name: Restore lychee cache - uses: actions/cache@v4 + uses: actions/cache/restore@v4 + id: cache-restore with: path: .lycheecache key: cache-lychee-${{ github.sha }} @@ -30,7 +31,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - args: --max-concurrency 1 --cache --max-cache-age 1d . + args: --max-concurrency 1 --cache --max-cache-age 1d --cache-exclude-status 300..=599 . + + - name: Save lychee cache + if: always() + uses: actions/cache/save@v4 + with: + path: .lycheecache + key: ${{ steps.cache-restore.outputs.cache-primary-key }} - name: Create Issue From File if: steps.lychee.outputs.exit_code != 0