ci(oci): fetch only the commits the validation checks need

This commit is contained in:
MacRimi
2026-10-28 18:12:17 +01:00
parent 616ba129b2
commit 2d4b0cb746
2 changed files with 1 additions and 2 deletions
@@ -33,7 +33,6 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
ref: develop ref: develop
fetch-depth: 0
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: '3.11'
+1 -1
View File
@@ -32,7 +32,6 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0
persist-credentials: false persist-credentials: false
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
@@ -45,5 +44,6 @@ jobs:
AUTHOR: ${{ github.event.pull_request.user.login }} AUTHOR: ${{ github.event.pull_request.user.login }}
BASE: ${{ github.event.pull_request.base.sha }} BASE: ${{ github.event.pull_request.base.sha }}
run: | run: |
git fetch --no-tags --depth=1 origin "$BASE"
git show "$BASE:oci/catalog/verification.json" > "$RUNNER_TEMP/base.json" 2>/dev/null || : > "$RUNNER_TEMP/base.json" git show "$BASE:oci/catalog/verification.json" > "$RUNNER_TEMP/base.json" 2>/dev/null || : > "$RUNNER_TEMP/base.json"
python3 .github/scripts/oci_validation.py authors --base "$RUNNER_TEMP/base.json" --author "$AUTHOR" python3 .github/scripts/oci_validation.py authors --base "$RUNNER_TEMP/base.json" --author "$AUTHOR"