migrate to runs-on runners

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
Alex Goodman 2025-11-07 17:49:39 -05:00
parent 78a4ab8ced
commit 178d38bc73
13 changed files with 43 additions and 31 deletions

View File

@ -20,7 +20,8 @@ permissions:
jobs: jobs:
analyze: analyze:
name: Analyze name: Analyze
runs-on: ubuntu-22.04-4core-16gb # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=small-arm
if: github.repository == 'anchore/syft' # only run for main repo if: github.repository == 'anchore/syft' # only run for main repo
permissions: permissions:
security-events: write security-events: write

View File

@ -7,4 +7,5 @@ permissions:
jobs: jobs:
run: run:
# Runner definition: workflows/.github/runs-on.yml
uses: anchore/workflows/.github/workflows/dependabot-automation.yaml@main uses: anchore/workflows/.github/workflows/dependabot-automation.yaml@main

View File

@ -27,7 +27,8 @@ env:
jobs: jobs:
label: label:
name: "Label changes" name: "Label changes"
runs-on: ubuntu-22.04 # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=small-arm
permissions: permissions:
contents: read contents: read
pull-requests: write pull-requests: write

View File

@ -13,6 +13,7 @@ on:
jobs: jobs:
run: run:
# Runner definition: workflows/.github/runs-on.yml
uses: "anchore/workflows/.github/workflows/oss-project-board-add.yaml@main" uses: "anchore/workflows/.github/workflows/oss-project-board-add.yaml@main"
secrets: secrets:
token: ${{ secrets.OSS_PROJECT_GH_TOKEN }} token: ${{ secrets.OSS_PROJECT_GH_TOKEN }}

View File

@ -13,7 +13,8 @@ on:
jobs: jobs:
quality-gate: quality-gate:
environment: release environment: release
runs-on: ubuntu-24.04 # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=tiny
steps: steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
with: with:
@ -119,7 +120,8 @@ jobs:
release: release:
needs: [quality-gate] needs: [quality-gate]
runs-on: ubuntu-24.04 # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=release
permissions: permissions:
contents: write contents: write
packages: write packages: write
@ -190,6 +192,7 @@ jobs:
release-install-script: release-install-script:
needs: [release] needs: [release]
if: ${{ needs.release.result == 'success' }} if: ${{ needs.release.result == 'success' }}
# Runner definition: workflows/.github/runs-on.yml
uses: "anchore/workflows/.github/workflows/release-install-script.yaml@main" uses: "anchore/workflows/.github/workflows/release-install-script.yaml@main"
with: with:
tag: ${{ github.event.inputs.version }} tag: ${{ github.event.inputs.version }}

View File

@ -10,6 +10,7 @@ jobs:
contents: read contents: read
issues: write issues: write
pull-requests: write pull-requests: write
# Runner definition: workflows/.github/runs-on.yml
uses: "anchore/workflows/.github/workflows/remove-awaiting-response-label.yaml@main" uses: "anchore/workflows/.github/workflows/remove-awaiting-response-label.yaml@main"
secrets: secrets:
token: ${{ secrets.OSS_PROJECT_GH_TOKEN }} token: ${{ secrets.OSS_PROJECT_GH_TOKEN }}

View File

@ -14,7 +14,8 @@ jobs:
Publish: Publish:
name: "Publish test fixture image cache" name: "Publish test fixture image cache"
# we use this runner to get enough storage space for docker images and fixture cache # we use this runner to get enough storage space for docker images and fixture cache
runs-on: ubuntu-22.04-4core-16gb # 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 if: github.repository == 'anchore/syft' # only run for main repo
permissions: permissions:
packages: write packages: write

View File

@ -12,7 +12,8 @@ permissions:
jobs: jobs:
update: update:
runs-on: ubuntu-latest # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=small-arm
if: github.repository_owner == 'anchore' # only run for main repo (not forks) if: github.repository_owner == 'anchore' # only run for main repo (not forks)
steps: steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0

View File

@ -10,7 +10,8 @@ permissions:
jobs: jobs:
update-bootstrap-tools: update-bootstrap-tools:
runs-on: ubuntu-latest # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=small
if: github.repository == 'anchore/syft' # only run for main repo if: github.repository == 'anchore/syft' # only run for main repo
steps: steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0

View File

@ -13,7 +13,8 @@ env:
jobs: jobs:
upgrade-cpe-dictionary-index: upgrade-cpe-dictionary-index:
runs-on: ubuntu-latest # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=small-arm
permissions: permissions:
contents: read contents: read
packages: write packages: write

View File

@ -13,7 +13,8 @@ env:
jobs: jobs:
upgrade-spdx-license-list: upgrade-spdx-license-list:
runs-on: ubuntu-latest # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=small-arm
if: github.repository == 'anchore/syft' # only run for main repo if: github.repository == 'anchore/syft' # only run for main repo
steps: steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0

View File

@ -18,7 +18,8 @@ permissions:
jobs: jobs:
zizmor: zizmor:
name: "Lint" name: "Lint"
runs-on: ubuntu-latest # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=small-arm
permissions: permissions:
contents: read contents: read
security-events: write # for uploading SARIF results security-events: write # for uploading SARIF results

View File

@ -11,11 +11,11 @@ permissions:
contents: read contents: read
jobs: jobs:
Static-Analysis: Static-Analysis:
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline # Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
name: "Static analysis" name: "Static analysis"
runs-on: ubuntu-24.04 # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=small-arm
steps: steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
with: with:
@ -27,12 +27,12 @@ jobs:
- name: Run static analysis - name: Run static analysis
run: make static-analysis run: make static-analysis
Unit-Test: Unit-Test:
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline # Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
name: "Unit tests" name: "Unit tests"
# we need more storage than what's on the default runner # we need more storage than what's on the default runner
runs-on: ubuntu-22.04-4core-16gb # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=small-arm
steps: steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
with: with:
@ -46,11 +46,11 @@ jobs:
- name: Run unit tests - name: Run unit tests
run: make unit run: make unit
Integration-Test: Integration-Test:
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline # Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
name: "Integration tests" name: "Integration tests"
runs-on: ubuntu-24.04 # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=small-arm
steps: steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
with: with:
@ -67,10 +67,10 @@ jobs:
- name: Run integration tests - name: Run integration tests
run: make integration run: make integration
Build-Snapshot-Artifacts: Build-Snapshot-Artifacts:
name: "Build snapshot artifacts" name: "Build snapshot artifacts"
runs-on: ubuntu-24.04 # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=build
steps: steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
with: with:
@ -100,12 +100,11 @@ jobs:
.task .task
key: snapshot-build-${{ github.run_id }} key: snapshot-build-${{ github.run_id }}
Upload-Snapshot-Artifacts: Upload-Snapshot-Artifacts:
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline # Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
name: "Upload snapshot artifacts" name: "Upload snapshot artifacts"
needs: [Build-Snapshot-Artifacts] needs: [Build-Snapshot-Artifacts]
runs-on: ubuntu-24.04 runs-on: ubuntu-latest-arm
steps: steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
with: with:
@ -162,7 +161,8 @@ jobs:
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline # Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
name: "Acceptance tests (Linux)" name: "Acceptance tests (Linux)"
needs: [Build-Snapshot-Artifacts] needs: [Build-Snapshot-Artifacts]
runs-on: ubuntu-24.04 # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=small-arm
steps: steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
with: with:
@ -202,7 +202,6 @@ jobs:
if: steps.install-test-image-cache.outputs.cache-hit != 'true' if: steps.install-test-image-cache.outputs.cache-hit != 'true'
run: make install-test-cache-save run: make install-test-cache-save
Acceptance-Mac: Acceptance-Mac:
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline # Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
name: "Acceptance tests (Mac)" name: "Acceptance tests (Mac)"
@ -244,12 +243,12 @@ jobs:
- name: Run install.sh tests (Mac) - name: Run install.sh tests (Mac)
run: make install-test-ci-mac run: make install-test-ci-mac
Cli-Linux: Cli-Linux:
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline # Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
name: "CLI tests (Linux)" name: "CLI tests (Linux)"
needs: [Build-Snapshot-Artifacts] needs: [Build-Snapshot-Artifacts]
runs-on: ubuntu-24.04 # Runner definition: workflows/.github/runs-on.yml
runs-on: runs-on=${{ github.run_id }}/runner=small-arm
steps: steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
with: with:
@ -278,11 +277,10 @@ jobs:
- name: Run CLI Tests (Linux) - name: Run CLI Tests (Linux)
run: make cli run: make cli
Cleanup-Cache: Cleanup-Cache:
name: "Cleanup snapshot cache" name: "Cleanup snapshot cache"
if: github.event.pull_request.head.repo.full_name == github.repository if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-24.04 runs-on: ubuntu-latest-arm
permissions: permissions:
actions: write actions: write
needs: needs: