1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-23 22:34:47 +02:00

Cache successful requests in lychee (#6030)

This does the same as we do in contrib, which is to cache successful
requests in lychee, so errors such as 429s have less changes of
occurring.
This commit is contained in:
Damien Mathieu
2024-12-11 08:10:41 +01:00
committed by GitHub
parent ac386f383c
commit 58fdf2a692
2 changed files with 20 additions and 4 deletions

View File

@@ -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 }}

View File

@@ -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