Skip to content

run build-nct first, it worked before, force a newer build for drivers #42

run build-nct first, it worked before, force a newer build for drivers

run build-nct first, it worked before, force a newer build for drivers #42

Workflow file for this run

name: Build NVIDIA drivers
on:
push:
branches:
- master
workflow_dispatch:
inputs:
nvidia-version:
description: NVIDIA Driver
type: string
required: false
nvidia-type:
description: Release type
type: choice
options:
- Production
- Beta
- Legacy
permissions:
id-token: write
contents: write
attestations: write
packages: write
concurrency:
group: nvidia-driver-${{ github.event.inputs.nvidia-version || github.ref }}
cancel-in-progress: true
jobs:
build:
environment: prod
strategy:
fail-fast: false
matrix:
arch: ["x86_64"] # , "aarch64"
fedora_version: ["43"]
runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build Nvidia driver
id: build
run: |
if [ "${{ matrix.arch }}" == "aarch64" ]; then
export BUILD_ARM=true
fi
FEDORA_VERSION="${{ matrix.fedora_version }}" ./build-nct.sh
VERSION="${{ github.event.inputs.nvidia-version || '580.105.08' }}" \
FEDORA_VERSION="${{ matrix.fedora_version }}" ./build.sh
echo "version=$(cat .driver-version)" >> $GITHUB_OUTPUT
- name: Build OCI image with drivers
id: oci
run: |
FEDORA_VERSION="${{ matrix.fedora_version }}" buildah unshare ./oci.sh
- name: Upload OCI image to Registry
id: upload
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io -u ${{ github.actor }} --password-stdin
podman push --digestfile .driver-version localhost/nvidia-oci-f${{ matrix.fedora_version}} \
"docker://ghcr.io/${{ github.repository }}:${{ steps.build.outputs.version }}-f${{ matrix.fedora_version }}-${{ matrix.arch }}"
echo "digest=$(cat .driver-version)" >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v3
with:
subject-digest: "${{ steps.upload.outputs.digest }}"
subject-name: "ghcr.io/${{ github.repository }}"
push-to-registry: true
- name: Upload OCI image as latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io -u ${{ github.actor }} --password-stdin
podman push localhost/nvidia-oci-f${{ matrix.fedora_version}} \
"docker://ghcr.io/${{ github.repository }}:latest-f${{ matrix.fedora_version }}-${{ matrix.arch }}"