Skip to content

Bump dependabot/fetch-metadata from 1.6.0 to 2.1.0 #344

Bump dependabot/fetch-metadata from 1.6.0 to 2.1.0

Bump dependabot/fetch-metadata from 1.6.0 to 2.1.0 #344

Workflow file for this run

---
name: CI
# yamllint disable-line rule:truthy
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:
permissions:
pull-requests: write
contents: write
jobs:
information:
name: Gather add-on information
runs-on: ubuntu-latest
outputs:
containersha: ${{ steps.information.outputs.containersha }}
description: ${{ steps.information.outputs.description }}
environment: ${{ steps.information.outputs.environment }}
name: ${{ steps.information.outputs.name }}
version: ${{ steps.information.outputs.version }}
build_date: ${{ steps.information.outputs.build_date }}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4
- name: ℹ️ Gather version and environment
id: information
# yamllint disable rule:line-length
run: |
sha="${{ github.sha }}"
environment="edge"
version="${sha:0:7}"
echo "containersha=${version}" >> $GITHUB_OUTPUT
if [[ "${{ github.event_name }}" = "release" ]]; then
version="${{ github.event.release.tag_name }}"
version="${version,,}"
version="${version#v}"
environment="stable"
if [[ "${{ github.event.release.prerelease }}" = "true" ]]; then
environment="beta"
fi
fi
echo "environment=${environment}" >> $GITHUB_OUTPUT
echo "version=${version}" >> $GITHUB_OUTPUT
echo "name=NVIDIA® CUDA® Toolkit" >> $GITHUB_OUTPUT
echo "description=NVIDIA® CUDA® Toolkit" >> $GITHUB_OUTPUT
# yamllint enable rule:line-length
build:
strategy:
matrix:
version: [12.3.1, 12.2.2, 12.0.1, 12.0.0, 11.8.0]
ffmpeg: [5.1.4, "6.0.1", "6.1.1"]
os: [ubuntu22.04]
include:
- version: 12.2.2
nvcodec: 12.0.16.0
- version: 12.0.1
nvcodec: 12.0.16.0
- version: 12.0.0
nvcodec: 12.0.16.0
- version: 11.8.0
nvcodec: 12.0.16.0
# yamllint disable rule:line-length
name: 👷 Build CUDA ${{ matrix.version }} on ${{ matrix.os }} with ffmpeg ${{ matrix.ffmpeg }}
needs:
- information
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4
# - name: Install Latest Docker
# # yamllint disable rule:line-length
# run: |
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# sudo apt-get update
# sudo apt-get install docker-ce
# # yamllint enable rule:line-length
- name: 📝 Docker meta
id: meta
uses: docker/metadata-action@v5
with:
flavor: |
latest=false
prefix=${{ matrix.version }}-${{ matrix.ffmpeg }}-${{ matrix.os }}-
suffix=
# list of Docker images to use as base name for tags
images: |
aperimau/nvidia-cuda-ffmpeg
ghcr.io/aperim/nvidia-cuda-ffmpeg
# generate Docker tags based on the following events/attributes
# yamllint disable rule:line-length
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=sha
type=edge,enable=${{ matrix.version == '12.3.1' && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.1.1' }},priority=700,prefix=,suffix=,branch=$repo.default_branch
# yamllint enable rule:line-length
- name: 🏗 Set up QEMU
uses: docker/setup-qemu-action@v3
- name: 🏗 Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: 🏗 Login to Docker Container Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: 🏗 Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CI_PAT }}
- name: 🚀 Conditional Build Args
id: buildargs
run: |
args="BUILD_DATE=\"${{ steps.flags.outputs.date }}\" \
BUILD_DESCRIPTION=\"${{ needs.information.outputs.description }}\" \
BUILD_NAME=\"${{ needs.information.outputs.name }}\" \
BUILD_REF=\"${{ github.sha }}\" \
BUILD_REPOSITORY=\"${{ github.repository }}\" \
BUILD_VERSION=\"${{ needs.information.outputs.version }}\" \
CUDA=\"${{ matrix.version }}\" \
OS=\"${{ matrix.os }}\" \
FFMPEG_VERSION=\"${{ matrix.ffmpeg }}\""
if [[ -n "${{ matrix.nvcodec }}" ]]; then
args+=" NVCODEC_HEADERS_VERSION=\"${{ matrix.nvcodec }}\""
fi
echo "args=${args}" >> $GITHUB_OUTPUT
- name: 🚀 Build
uses: docker/build-push-action@v5
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
context: ./
file: ./ffmpeg/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# yamllint disable-line rule:line-length
# platforms: linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8
platforms: linux/amd64
build-args: ${{ steps.buildargs.outputs.args }}