mirror of
https://github.com/jellyfin/jellyfin-ffmpeg.git
synced 2024-11-23 05:49:42 +00:00
Merge pull request #354 from jellyfin/ci-update-5
Update CI for 5.x branch
This commit is contained in:
commit
25dbaf813e
50
.github/workflows/_meta.yaml
vendored
50
.github/workflows/_meta.yaml
vendored
@ -73,10 +73,13 @@ jobs:
|
||||
const tag = context.ref.substring(10)
|
||||
const no_v = tag.replace('v', '')
|
||||
const dash_index = no_v.lastIndexOf('-')
|
||||
const major_index = no_v.firstIndexOf('.')
|
||||
const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v
|
||||
const major = (major_index > -1) ? no_v.substring(0, major_index) : no_v
|
||||
core.setOutput('tag', tag)
|
||||
core.setOutput('no-v', no_v)
|
||||
core.setOutput('no-dash', no_dash)
|
||||
core.setOutput('major', major)
|
||||
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v3.0.1
|
||||
@ -84,14 +87,6 @@ jobs:
|
||||
name: ${{ inputs.distro }}-${{ matrix.release }}-${{ matrix.arch }}
|
||||
path: artifact
|
||||
|
||||
- name: Prepare Release Assets
|
||||
run: |-
|
||||
pushd artifact
|
||||
find * -type f -name "*.deb" | while read file; do
|
||||
sha256sum "${file}" | tee "${file}.sha256sum"
|
||||
done
|
||||
popd
|
||||
|
||||
- name: Upload GH Release Assets
|
||||
uses: shogo82148/actions-upload-release-asset@v1.6.3
|
||||
with:
|
||||
@ -100,24 +95,27 @@ jobs:
|
||||
asset_path: |
|
||||
./artifact/**/*.zip
|
||||
./artifact/**/*.deb
|
||||
./artifact/**/*.sha256sum
|
||||
|
||||
- name: Make Sure Release Directory Exists
|
||||
uses: appleboy/ssh-action@v0.1.5
|
||||
- name: Upload release archive to repo.jellyfin.org
|
||||
uses: appleboy/scp-action@917f8b81dfc1ccd331fef9e2d61bdc6c8be94634 # v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.deploy-host }}
|
||||
username: ${{ secrets.deploy-user }}
|
||||
key: ${{ secrets.deploy-key }}
|
||||
host: ${{ secrets.REPO_HOST }}
|
||||
username: ${{ secrets.REPO_USER }}
|
||||
key: ${{ secrets.REPO_KEY }}
|
||||
source: artifact/*
|
||||
strip_components: 1
|
||||
target: /srv/incoming/ffmpeg/${{ steps.set_version.outputs.no-v }}/${{ inputs.distro }}/${{ matrix.arch }}
|
||||
|
||||
- name: Move incoming release into repository
|
||||
uses: appleboy/ssh-action@8f949198563a347a01c65ffc60399aef2b59d4ab # v1.0.1
|
||||
with:
|
||||
host: ${{ secrets.REPO_HOST }}
|
||||
username: ${{ secrets.REPO_USER }}
|
||||
key: ${{ secrets.REPO_KEY }}
|
||||
envs: JELLYFIN_VERSION
|
||||
script_stop: true
|
||||
script: |-
|
||||
mkdir -p /srv/repository/releases/server/${{ inputs.distro }}/versions/jellyfin-ffmpeg/${{ steps.set_version.outputs.no-v }}/
|
||||
|
||||
- name: Upload Release Assets
|
||||
uses: burnett01/rsync-deployments@5.2.1
|
||||
with:
|
||||
switches: -vrptz
|
||||
path: ./artifact/*
|
||||
remote_path: /srv/repository/releases/server/${{ inputs.distro }}/versions/jellyfin-ffmpeg/${{ steps.set_version.outputs.no-v }}/
|
||||
remote_host: ${{ secrets.deploy-host }}
|
||||
remote_user: ${{ secrets.deploy-user }}
|
||||
remote_key: ${{ secrets.deploy-key }}
|
||||
script: |
|
||||
if [ -d "/srv/repository/main/ffmpeg/${{ inputs.distro }}/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }}/${{ matrix.arch }}" ] && [ -n "${{ steps.set_version.outputs.major }}" ] && [ -n "${{ steps.set_version.outputs.no-v }}" ]; then
|
||||
sudo rm -r /srv/repository/main/ffmpeg/${{ inputs.distro }}/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }}/${{ matrix.arch }}
|
||||
fi
|
||||
sudo mv -t /srv/repository/main/ffmpeg/${{ inputs.distro }}/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }}/${{ matrix.arch }} /srv/incoming/ffmpeg/${{ steps.set_version.outputs.no-v }}/${{ inputs.distro }}/${{ matrix.arch }}
|
||||
|
50
.github/workflows/_meta_portable.yaml
vendored
50
.github/workflows/_meta_portable.yaml
vendored
@ -63,10 +63,13 @@ jobs:
|
||||
const tag = context.ref.substring(10)
|
||||
const no_v = tag.replace('v', '')
|
||||
const dash_index = no_v.lastIndexOf('-')
|
||||
const major_index = no_v.firstIndexOf('.')
|
||||
const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v
|
||||
const major = (major_index > -1) ? no_v.substring(0, major_index) : no_v
|
||||
core.setOutput('tag', tag)
|
||||
core.setOutput('no-v', no_v)
|
||||
core.setOutput('no-dash', no_dash)
|
||||
core.setOutput('major', major)
|
||||
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v3.0.1
|
||||
@ -74,14 +77,6 @@ jobs:
|
||||
name: ${{ inputs.os }}-${{ matrix.arch }}-portable
|
||||
path: artifact
|
||||
|
||||
- name: Prepare Release Assets
|
||||
run: |-
|
||||
pushd artifact
|
||||
find * -type f \( -name "*.xz" -o -name "*.zip" \) | while read file; do
|
||||
sha256sum "${file}" | tee "${file}.sha256sum"
|
||||
done
|
||||
popd
|
||||
|
||||
- name: Upload GH Release Assets
|
||||
uses: shogo82148/actions-upload-release-asset@v1.6.3
|
||||
with:
|
||||
@ -90,24 +85,27 @@ jobs:
|
||||
asset_path: |
|
||||
./artifact/**/*.zip
|
||||
./artifact/**/*.tar.xz
|
||||
./artifact/**/*.sha256sum
|
||||
|
||||
- name: Make Sure FFmpeg Directory Exists
|
||||
uses: appleboy/ssh-action@v0.1.5
|
||||
- name: Upload release archive to repo.jellyfin.org
|
||||
uses: appleboy/scp-action@917f8b81dfc1ccd331fef9e2d61bdc6c8be94634 # v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.deploy-host }}
|
||||
username: ${{ secrets.deploy-user }}
|
||||
key: ${{ secrets.deploy-key }}
|
||||
host: ${{ secrets.REPO_HOST }}
|
||||
username: ${{ secrets.REPO_USER }}
|
||||
key: ${{ secrets.REPO_KEY }}
|
||||
source: artifact/*
|
||||
strip_components: 1
|
||||
target: /srv/incoming/ffmpeg/${{ steps.set_version.outputs.no-v }}/${{ inputs.os }}/${{ matrix.arch }}
|
||||
|
||||
- name: Move incoming release into repository
|
||||
uses: appleboy/ssh-action@8f949198563a347a01c65ffc60399aef2b59d4ab # v1.0.1
|
||||
with:
|
||||
host: ${{ secrets.REPO_HOST }}
|
||||
username: ${{ secrets.REPO_USER }}
|
||||
key: ${{ secrets.REPO_KEY }}
|
||||
envs: JELLYFIN_VERSION
|
||||
script_stop: true
|
||||
script: |-
|
||||
mkdir -p /srv/repository/releases/ffmpeg/${{ steps.set_version.outputs.no-v }}/
|
||||
|
||||
- name: Upload Release Assets
|
||||
uses: burnett01/rsync-deployments@5.2.1
|
||||
with:
|
||||
switches: -vrptz
|
||||
path: ./artifact/*
|
||||
remote_path: /srv/repository/releases/ffmpeg/${{ steps.set_version.outputs.no-v }}/
|
||||
remote_host: ${{ secrets.deploy-host }}
|
||||
remote_user: ${{ secrets.deploy-user }}
|
||||
remote_key: ${{ secrets.deploy-key }}
|
||||
script: |
|
||||
if [ -d "/srv/repository/main/ffmpeg/${{ inputs.os }}/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }}/${{ matrix.arch }}" ] && [ -n "${{ steps.set_version.outputs.major }}" ] && [ -n "${{ steps.set_version.outputs.no-v }}" ]; then
|
||||
sudo rm -r /srv/repository/main/ffmpeg/${{ inputs.os }}/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }}/${{ matrix.arch }}
|
||||
fi
|
||||
sudo mv -t /srv/repository/main/ffmpeg/${{ inputs.os }}/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }}/${{ matrix.arch }} /srv/incoming/ffmpeg/${{ steps.set_version.outputs.no-v }}/${{ inputs.os }}/${{ matrix.arch }}
|
||||
|
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
@ -32,7 +32,7 @@ jobs:
|
||||
uses: ./.github/workflows/_meta.yaml
|
||||
with:
|
||||
distro: 'ubuntu'
|
||||
codenames: '["bionic", "focal", "jammy", "lunar", "mantic"]'
|
||||
codenames: '["focal", "jammy"]'
|
||||
architectures: '["amd64", "arm64", "armhf"]'
|
||||
release: false
|
||||
|
||||
|
80
.github/workflows/publish.yaml
vendored
80
.github/workflows/publish.yaml
vendored
@ -14,21 +14,21 @@ jobs:
|
||||
architectures: '["amd64", "arm64", "armhf"]'
|
||||
release: true
|
||||
secrets:
|
||||
deploy-host: ${{ secrets.DEPLOY_HOST }}
|
||||
deploy-user: ${{ secrets.DEPLOY_USER }}
|
||||
deploy-key: ${{ secrets.DEPLOY_KEY }}
|
||||
deploy-host: ${{ secrets.REPO_HOST }}
|
||||
deploy-user: ${{ secrets.REPO_USER }}
|
||||
deploy-key: ${{ secrets.REPO_KEY }}
|
||||
|
||||
build_publish_ubuntu:
|
||||
uses: ./.github/workflows/_meta.yaml
|
||||
with:
|
||||
distro: 'ubuntu'
|
||||
codenames: '["bionic", "focal", "jammy", "lunar", "mantic"]'
|
||||
codenames: '["focal", "jammy"]'
|
||||
architectures: '["amd64", "arm64", "armhf"]'
|
||||
release: true
|
||||
secrets:
|
||||
deploy-host: ${{ secrets.DEPLOY_HOST }}
|
||||
deploy-user: ${{ secrets.DEPLOY_USER }}
|
||||
deploy-key: ${{ secrets.DEPLOY_KEY }}
|
||||
deploy-host: ${{ secrets.REPO_HOST }}
|
||||
deploy-user: ${{ secrets.REPO_USER }}
|
||||
deploy-key: ${{ secrets.REPO_KEY }}
|
||||
|
||||
build_publish_windows_portable:
|
||||
uses: ./.github/workflows/_meta_portable.yaml
|
||||
@ -37,9 +37,9 @@ jobs:
|
||||
architectures: '["win64"]'
|
||||
release: true
|
||||
secrets:
|
||||
deploy-host: ${{ secrets.DEPLOY_HOST }}
|
||||
deploy-user: ${{ secrets.DEPLOY_USER }}
|
||||
deploy-key: ${{ secrets.DEPLOY_KEY }}
|
||||
deploy-host: ${{ secrets.REPO_HOST }}
|
||||
deploy-user: ${{ secrets.REPO_USER }}
|
||||
deploy-key: ${{ secrets.REPO_KEY }}
|
||||
|
||||
build_publish_linux_portable:
|
||||
uses: ./.github/workflows/_meta_portable.yaml
|
||||
@ -48,9 +48,9 @@ jobs:
|
||||
architectures: '["amd64", "arm64"]'
|
||||
release: true
|
||||
secrets:
|
||||
deploy-host: ${{ secrets.DEPLOY_HOST }}
|
||||
deploy-user: ${{ secrets.DEPLOY_USER }}
|
||||
deploy-key: ${{ secrets.DEPLOY_KEY }}
|
||||
deploy-host: ${{ secrets.REPO_HOST }}
|
||||
deploy-user: ${{ secrets.REPO_USER }}
|
||||
deploy-key: ${{ secrets.REPO_KEY }}
|
||||
|
||||
maintain_repository:
|
||||
name: Maintain Repository
|
||||
@ -66,39 +66,32 @@ jobs:
|
||||
{distro: 'debian', codename: 'buster'},
|
||||
{distro: 'debian', codename: 'bullseye'},
|
||||
{distro: 'debian', codename: 'bookworm'},
|
||||
{distro: 'ubuntu', codename: 'bionic'},
|
||||
{distro: 'ubuntu', codename: 'focal'},
|
||||
{distro: 'ubuntu', codename: 'jammy'},
|
||||
{distro: 'ubuntu', codename: 'lunar'},
|
||||
{distro: 'ubuntu', codename: 'mantic'}
|
||||
{distro: 'ubuntu', codename: 'jammy'}
|
||||
]
|
||||
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 }}
|
||||
host: ${{ secrets.REPO_HOST }}
|
||||
username: ${{ secrets.REPO_USER }}
|
||||
key: ${{ secrets.REPO_KEY }}
|
||||
script_stop: true
|
||||
script: |-
|
||||
set -o errexit
|
||||
set -o xtrace
|
||||
tag="${{ github.event.release.tag_name }}"
|
||||
version="${tag#v}"
|
||||
major_version="${version%%.*}
|
||||
basename="jellyfin-ffmpeg*_${version}-${{ matrix.arrays.codename }}"
|
||||
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}
|
||||
basedir="/srv/repository/main/ffmpeg/${{ matrix.arrays.distro }}/${major_version}.x/${version}"
|
||||
find ${basedir} -type f -name "${basename}_*.deb" | while read file; do
|
||||
sudo reprepro -b /srv/${{ 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 }}/ffmpeg
|
||||
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 }}/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
|
||||
sudo reprepro -b /srv/${{ matrix.arrays.distro }} deleteunreferenced
|
||||
sudo reprepro -b /srv/${{ matrix.arrays.distro }} export
|
||||
sudo rm -f /srv/repository/main/ffmpeg/${{ matrix.arrays.distro }}/latest-${major_version}.x
|
||||
sudo ln -s ${basedir} /srv/repository/main/ffmpeg/${{ matrix.arrays.distro }}/latest-${major_version}.x
|
||||
|
||||
maintain_repository_portable:
|
||||
name: Maintain Repository (Portable)
|
||||
@ -116,25 +109,16 @@ jobs:
|
||||
- name: Update symlinks
|
||||
uses: appleboy/ssh-action@v0.1.4
|
||||
with:
|
||||
host: ${{ secrets.DEPLOY_HOST }}
|
||||
username: ${{ secrets.DEPLOY_USER }}
|
||||
key: ${{ secrets.DEPLOY_KEY }}
|
||||
host: ${{ secrets.REPO_HOST }}
|
||||
username: ${{ secrets.REPO_USER }}
|
||||
key: ${{ secrets.REPO_KEY }}
|
||||
script_stop: true
|
||||
script: |-
|
||||
set -o errexit
|
||||
set -o xtrace
|
||||
tag="${{ github.event.release.tag_name }}"
|
||||
version="${tag#v}"
|
||||
find /srv/repository/releases/server/${{ matrix.arrays.distro }}/ -type l -name "jellyfin-ffmpeg*_*" -exec rm {} \;
|
||||
if [ "${{ matrix.arrays.distro }}" == "windows" ]; then
|
||||
mkdir -p /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version}
|
||||
ln -fs /srv/repository/releases/ffmpeg/${version}/*.zip /srv/repository/releases/ffmpeg/${version}/jellyfin-ffmpeg-portable_win64.zip
|
||||
ln -fs /srv/repository/releases/ffmpeg/${version}/*.zip /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version}/
|
||||
ln -fs /srv/repository/releases/ffmpeg/${version}/*.zip.sha265sum /srv/repository/releases/server/${{ matrix.arrays.distro }}/versions/jellyfin-ffmpeg/${version}/
|
||||
fi
|
||||
rm -f /srv/repository/releases/server/${{ matrix.arrays.distro }}/ffmpeg
|
||||
rm -f /srv/repository/releases/server/${{ matrix.arrays.distro }}/{stable,stable-pre,unstable}/ffmpeg
|
||||
ln -fs /srv/repository/releases/ffmpeg/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/ffmpeg
|
||||
ln -fs /srv/repository/releases/ffmpeg/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/stable/ffmpeg
|
||||
ln -fs /srv/repository/releases/ffmpeg/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/stable-pre/ffmpeg
|
||||
ln -fs /srv/repository/releases/ffmpeg/${version} /srv/repository/releases/server/${{ matrix.arrays.distro }}/unstable/ffmpeg
|
||||
major_version="${version%%.*}
|
||||
basedir="/srv/repository/main/ffmpeg/${{ matrix.arrays.distro }}/${major_version}.x/${version}"
|
||||
sudo rm -f /srv/repository/main/ffmpeg/${{ matrix.arrays.distro }}/latest-${major_version}.x
|
||||
sudo ln -s ${basedir} /srv/repository/main/ffmpeg/${{ matrix.arrays.distro }}/latest-${major_version}.x
|
||||
|
Loading…
Reference in New Issue
Block a user