github.com/anchore/syft@v1.38.2/.github/workflows/test-fixture-cache-publish.yaml (about)

     1  name: "Test fixture cache: publish"
     2  
     3  on:
     4    workflow_dispatch:
     5    schedule:
     6      # run nightly at 4AM UTC
     7      - cron: "0 4 * * *"
     8  
     9  permissions:
    10    contents: read
    11  
    12  jobs:
    13  
    14    Publish:
    15      name: "Publish test fixture image cache"
    16      # we use this runner to get enough storage space for docker images and fixture cache
    17      runs-on: ubuntu-22.04-4core-16gb
    18      if: github.repository == 'anchore/syft' # only run for main repo
    19      permissions:
    20        packages: write
    21      steps:
    22        - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
    23          with:
    24            persist-credentials: false
    25  
    26        - name: Bootstrap environment
    27          uses: ./.github/actions/bootstrap
    28          with:
    29            # we want to rebuild the cache with no previous state
    30            download-test-fixture-cache: false
    31  
    32        - name: Run all tests
    33          run: make test
    34          env:
    35            # we want to rebuild the cache with no previous state
    36            DOWNLOAD_TEST_FIXTURE_CACHE: "false"
    37  
    38        - name: Login to GitHub Container Registry (ORAS)
    39          run: echo "${{ secrets.GITHUB_TOKEN }}" | .tool/oras login ghcr.io -u "$ACTOR" --password-stdin
    40          env:
    41            ACTOR: ${{ github.actor }}
    42  
    43        - name: Publish test fixture cache
    44          run: make upload-test-fixture-cache