mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: "Test fixture cache: publish"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# run nightly at 4AM UTC
|
|
- cron: "0 4 * * *"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
|
|
Publish:
|
|
name: "Publish test fixture image cache"
|
|
# we use this runner to get enough storage space for docker images and fixture cache
|
|
# Runner definition: workflows/.github/runs-on.yml
|
|
runs-on: runs-on=${{ github.run_id }}/runner=release
|
|
if: github.repository == 'anchore/syft' # only run for main repo
|
|
permissions:
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Bootstrap environment
|
|
uses: ./.github/actions/bootstrap
|
|
with:
|
|
# we want to rebuild the cache with no previous state
|
|
download-test-fixture-cache: false
|
|
|
|
- name: Run all tests
|
|
run: make test
|
|
env:
|
|
# we want to rebuild the cache with no previous state
|
|
DOWNLOAD_TEST_FIXTURE_CACHE: "false"
|
|
|
|
- name: Login to GitHub Container Registry (ORAS)
|
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | .tool/oras login ghcr.io -u "$ACTOR" --password-stdin
|
|
env:
|
|
ACTOR: ${{ github.actor }}
|
|
|
|
- name: Publish test fixture cache
|
|
run: make upload-test-fixture-cache
|