Skip to content
Latchkey

basic checks workflow (NVIDIA/k8s-device-plugin)

The basic checks workflow from NVIDIA/k8s-device-plugin, explained and optimized by Latchkey.

A

CI health: A - excellent

Run this on Latchkey for self-healing, caching, and up to 58% lower cost.

Grade your own workflow free or run it on Latchkey →
Source: NVIDIA/k8s-device-plugin.github/workflows/basic-checks.yamlLicense Apache-2.0View source

What it does

This is the basic checks workflow from the NVIDIA/k8s-device-plugin 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: "basic checks"

on:
  workflow_call:
    outputs:
      version:
        description: "The short SHA to use as a version string"
        value: ${{ jobs.variables.outputs.version }}
      golang_version:
        description: "The golang version for this project"
        value: ${{ jobs.variables.outputs.golang_version }}

jobs:
  variables:
    uses: ./.github/workflows/variables.yaml

  golang:
    needs:
    - variables
    uses: ./.github/workflows/golang.yaml
    secrets: inherit
    with:
      golang_version: ${{ needs.variables.outputs.golang_version }}

  helm:
    needs:
    - variables
    uses: ./.github/workflows/helm.yaml
    with:
      golang_version: ${{ needs.variables.outputs.golang_version }}

  code-scanning:
    needs:
    - variables
    uses: ./.github/workflows/code_scanning.yaml
    with:
      golang_version: ${{ needs.variables.outputs.golang_version }}

The same workflow, on Latchkey

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

name: "basic checks"
 
on:
  workflow_call:
    outputs:
      version:
        description: "The short SHA to use as a version string"
        value: ${{ jobs.variables.outputs.version }}
      golang_version:
        description: "The golang version for this project"
        value: ${{ jobs.variables.outputs.golang_version }}
 
jobs:
  variables:
    timeout-minutes: 30
    uses: ./.github/workflows/variables.yaml
 
  golang:
    timeout-minutes: 30
    needs:
    - variables
    uses: ./.github/workflows/golang.yaml
    secrets: inherit
    with:
      golang_version: ${{ needs.variables.outputs.golang_version }}
 
  helm:
    timeout-minutes: 30
    needs:
    - variables
    uses: ./.github/workflows/helm.yaml
    with:
      golang_version: ${{ needs.variables.outputs.golang_version }}
 
  code-scanning:
    timeout-minutes: 30
    needs:
    - variables
    uses: ./.github/workflows/code_scanning.yaml
    with:
      golang_version: ${{ needs.variables.outputs.golang_version }}
 

What changed

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