/
githubmirror
/
trivy
Обзор
Документация
Войти
/
githubmirror
/
trivy
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/workflows/cache-test-assets.yaml
95 строк
3 KB
dependabot[bot]
chore(deps): bump the github-actions group across 2 directories with 15 updates (#11028)
04 авг 2026, 12:04
Не верифицирован
04 авг 2026, 12:04
d4bffda
Код
Авторство
О чём код?
name: Cache test assets # This workflow runs on the main branch to create caches that can be accessed by PRs. # GitHub Actions cache isolation restricts access: # - PRs can only restore caches from: current branch, base branch, and default branch (main) # - PRs cannot restore caches from sibling branches or other PR branches # - By creating caches on the main branch, all PRs can benefit from shared cache on: push: branches: [main] workflow_dispatch: jobs: test-images: name: Cache test images runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Set up Go uses: ./.github/actions/setup-go - name: Install Go tools run: go install tool # GOBIN is added to the PATH by the setup-go action - name: Generate image list digest id: image-digest run: | source integration/testimages.ini IMAGE_LIST=$(skopeo list-tags docker://$TEST_IMAGES) DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags |= sort' | sha256sum | cut -d' ' -f1) echo "digest=$DIGEST" >> $GITHUB_OUTPUT - name: Restore and save test images cache uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: integration/testdata/fixtures/images key: cache-test-images-${{ steps.image-digest.outputs.digest }} - name: Download test images run: mage test:fixtureContainerImages test-vm-images: name: Cache test VM images runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Set up Go uses: ./.github/actions/setup-go - name: Install Go tools run: go install tool # GOBIN is added to the PATH by the setup-go action - name: Generate image list digest id: image-digest run: | source integration/testimages.ini IMAGE_LIST=$(skopeo list-tags docker://$TEST_VM_IMAGES) DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags |= sort' | sha256sum | cut -d' ' -f1) echo "digest=$DIGEST" >> $GITHUB_OUTPUT - name: Restore and save test VM images cache uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: integration/testdata/fixtures/vm-images key: cache-test-vm-images-${{ steps.image-digest.outputs.digest }} - name: Download test VM images run: mage test:fixtureVMImages lint-cache: name: Cache lint results runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Set up Go uses: ./.github/actions/setup-go - name: Run golangci-lint for caching uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 with: version: v2.12 args: --verbose env: GOEXPERIMENT: jsonv2