mirror of
https://github.com/jellyfin/jellyfin-ffmpeg.git
synced 2026-09-03 05:09:58 +03:00
92 lines
4.1 KiB
YAML
92 lines
4.1 KiB
YAML
name: '🚀 Build and Publish jellyfin-ffmpeg'
|
|
|
|
on:
|
|
release:
|
|
types:
|
|
- released
|
|
|
|
jobs:
|
|
build_publish_debian:
|
|
uses: jellyfin/jellyfin-ffmpeg/.github/workflows/_meta.yaml@jellyfin
|
|
with:
|
|
distro: 'debian'
|
|
codenames: '["buster", "bullseye"]'
|
|
architectures: '["amd64", "arm64", "armhf"]'
|
|
release: true
|
|
secrets:
|
|
deploy-host: ${{ secrets.DEPLOY_HOST }}
|
|
deploy-user: ${{ secrets.DEPLOY_USER }}
|
|
deploy-key: ${{ secrets.DEPLOY_KEY }}
|
|
|
|
build_publish_ubuntu:
|
|
uses: jellyfin/jellyfin-ffmpeg/.github/workflows/_meta.yaml@jellyfin
|
|
with:
|
|
distro: 'ubuntu'
|
|
codenames: '["jammy", "focal", "bionic", "impish"]'
|
|
architectures: '["amd64", "arm64", "armhf"]'
|
|
release: true
|
|
secrets:
|
|
deploy-host: ${{ secrets.DEPLOY_HOST }}
|
|
deploy-user: ${{ secrets.DEPLOY_USER }}
|
|
deploy-key: ${{ secrets.DEPLOY_KEY }}
|
|
|
|
build_publish_windows:
|
|
uses: jellyfin/jellyfin-ffmpeg/.github/workflows/_meta.yaml@jellyfin
|
|
with:
|
|
distro: 'windows'
|
|
codenames: '["windows"]'
|
|
architectures: '["win64"]'
|
|
release: true
|
|
secrets:
|
|
deploy-host: ${{ secrets.DEPLOY_HOST }}
|
|
deploy-user: ${{ secrets.DEPLOY_USER }}
|
|
deploy-key: ${{ secrets.DEPLOY_KEY }}
|
|
|
|
maintain_repository:
|
|
name: Maintain Repository
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- build_publish_debian
|
|
- build_publish_ubuntu
|
|
- build_publish_windows
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
arrays: [
|
|
{distro: 'debian', codename: 'buster'},
|
|
{distro: 'debian', codename: 'bullseye'},
|
|
{distro: 'ubuntu', codename: 'jammy'},
|
|
{distro: 'ubuntu', codename: 'focal'},
|
|
{distro: 'ubuntu', codename: 'bionic'},
|
|
{distro: 'ubuntu', codename: 'impish'},
|
|
{distro: 'windows', codename: 'windows'},
|
|
]
|
|
steps:
|
|
- name: Sync mirrors and update symlinks
|
|
uses: appleboy/ssh-action@v0.1.4
|
|
with:
|
|
host: ${{ secrets.DEPLOY_HOST }}
|
|
username: ${{ secrets.DEPLOY_USER }}
|
|
key: ${{ secrets.DEPLOY_KEY }}
|
|
script_stop: true
|
|
script: |-
|
|
tag="${{ github.release.tag_name }}"
|
|
version="${tag#v}"
|
|
basename="jellyfin-ffmpeg_${version}-${{ matrix.arrays.codename }}"
|
|
if [ "${{ matrix.arrays.distro }}" != "windows" ]; then
|
|
find /srv/repository/releases/server/${{ matrix.arrays.distro }}/ -type l -name "jellyfin-ffmpeg_*" -exec rm {} \;
|
|
find /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version} -type f -name "${basename}_*.deb" | while read file; do
|
|
reprepro -b /srv/repository/${{ matrix.arrays.distro }} --export=never --keepunreferencedfiles includedeb ${{ matrix.arrays.codename }} ${file}
|
|
done
|
|
find /srv/repository/releases/server/${{ matrix.arrays.distro }}/ -type l -name "${basename}_*" -exec rm {} \;
|
|
reprepro -b /srv/repository/${{ matrix.arrays.distro }} deleteunreferenced
|
|
reprepro -b /srv/repository/${{ matrix.arrays.distro }} export
|
|
rm -f /srv/repository/releases/server/${{ matrix.arrays.distro }}/{stable,stable-pre,unstable}/ffmpeg
|
|
ln -fs /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/stable/ffmpeg
|
|
ln -fs /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/stable-pre/ffmpeg
|
|
ln -fs /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/unstable/ffmpeg
|
|
else
|
|
rm -f /srv/repository/releases/server/${{ matrix.arrays.distro }}/ffmpeg
|
|
ln -fs /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/ffmpeg
|
|
fi
|