Skip to content
Latchkey

Fossa scan workflow (rancher/rke)

The Fossa scan workflow from rancher/rke, explained and optimized by Latchkey.

C

CI health: C - fair

Point runs-on at Latchkey and get run de-duplication, job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: rancher/rke.github/workflows/fossa.yamlLicense Apache-2.0View source

What it does

This is the Fossa scan workflow from the rancher/rke repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Fossa scan

on:
    push: 
      branches:
        - '**'
      tags:
        - '*'

jobs:
  fossa:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
    timeout-minutes: 20
    steps:
      - name: Checkout Repo
        uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
      - name: Read FOSSA token
        uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3
        with:
          secrets: |
            secret/data/github/org/rancher/fossa/push token | FOSSA_API_KEY_PUSH_ONLY
      - name: FOSSA scan
        uses: fossas/fossa-action@c414b9ad82eaad041e47a7cf62a4f02411f427a0 # v1.8.0
        with:
          api-key: ${{ env.FOSSA_API_KEY_PUSH_ONLY }}
          run-tests: false

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Fossa scan
 
on:
    push: 
      branches:
        - '**'
      tags:
        - '*'
 
concurrency:
    group: ${{ github.workflow }}-${{ github.ref }}
    cancel-in-progress: true
 
jobs:
  fossa:
      timeout-minutes: 30
    runs-on: latchkey-small
    permissions:
      contents: read
      id-token: write
    timeout-minutes: 20
    steps:
      - name: Checkout Repo
        uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
      - name: Read FOSSA token
        uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3
        with:
          secrets: |
            secret/data/github/org/rancher/fossa/push token | FOSSA_API_KEY_PUSH_ONLY
      - name: FOSSA scan
        uses: fossas/fossa-action@c414b9ad82eaad041e47a7cf62a4f02411f427a0 # v1.8.0
        with:
          api-key: ${{ env.FOSSA_API_KEY_PUSH_ONLY }}
          run-tests: false
 

What changed

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow