Skip to content

fix nv-codec-headers versions to 11.x #55

fix nv-codec-headers versions to 11.x

fix nv-codec-headers versions to 11.x #55

Workflow file for this run

name: ffmpeg-release
on:
push:
tags:
- v*
branches: [main]
jobs:
export:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
strategy:
matrix:
ffmpeg: ["7.0.2", "6.1.2", "5.1.6", "4.4.5"]
flavor: [linux, windows]
env:
target_os:
build_tag:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set build target (linux)
if: matrix.flavor == 'linux'
run: |
echo "build_tag=ffmpeg-linux-export" >> $GITHUB_ENV
echo "target_os=linux-amd64" >> $GITHUB_ENV
- name: Set build target (windows)
if: matrix.flavor == 'windows'
run: |
echo "build_tag=ffmpeg-windows-export" >> $GITHUB_ENV
echo "target_os=windows-x64" >> $GITHUB_ENV
- name: Export - ffmpeg
run: |
docker buildx build --platform linux/amd64 --target ${{ env.build_tag }} --output type=local,dest=/tmp/build \
-t ${{ env.build_tag }} --build-arg FFMPEG_VERSION=${{ matrix.ffmpeg }} -f ./Dockerfile .
- name: Archive artifact
run: |
mkdir /tmp/ffmpeg-${{ matrix.ffmpeg }}-${{ env.target_os }}
mv /tmp/build/* /tmp/ffmpeg-${{ matrix.ffmpeg }}-${{ env.target_os }}/
tar acvf /tmp/ffmpeg-${{ matrix.ffmpeg }}-${{ env.target_os }}.tar.xz -C /tmp ffmpeg-${{ matrix.ffmpeg }}-${{ env.target_os }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ffmpeg-${{ matrix.ffmpeg }}-${{ env.target_os }}
path: /tmp/ffmpeg-${{ matrix.ffmpeg }}-${{ env.target_os }}.tar.xz
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: [export]
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
path: /tmp/artifact
- name: Release
uses: softprops/action-gh-release@v2
with:
files: /tmp/artifact/**/*.tar.xz