mirror of
https://github.com/meeb/tubesync.git
synced 2026-04-06 00:01:50 +08:00
79 lines
2.8 KiB
YAML
79 lines
2.8 KiB
YAML
name: Release TubeSync
|
|
|
|
env:
|
|
IMAGE_NAME: tubesync
|
|
REGISTRY: ghcr.io
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
info:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
IMAGE_NAME: ${{ env.IMAGE_NAME }}
|
|
REGISTRY: ${{ env.REGISTRY }}
|
|
ffmpeg-date: ${{ steps.ffmpeg.outputs.date }}
|
|
# ffmpeg-releases: ${{ steps.ffmpeg.outputs.releases }}
|
|
ffmpeg-version: ${{ steps.ffmpeg.outputs.version }}
|
|
lowercase-github-actor: ${{ steps.github-actor.outputs.lowercase }}
|
|
lowercase-github-repository_owner: ${{ steps.github-repository_owner.outputs.lowercase }}
|
|
tag: ${{ steps.tag.outputs.tag }}
|
|
ytdlp-latest-release: ${{ steps.yt-dlp.outputs.latest-release }}
|
|
# ytdlp-releases: ${{ steps.yt-dlp.outputs.releases }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Get tag
|
|
id: tag
|
|
uses: ./.github/actions/get-tag
|
|
- name: Lowercase github username
|
|
id: github-actor
|
|
uses: ./.github/actions/string-case
|
|
with:
|
|
string: ${{ github.actor }}
|
|
- name: Lowercase github repository owner
|
|
id: github-repository_owner
|
|
uses: ./.github/actions/string-case
|
|
with:
|
|
string: ${{ github.repository_owner }}
|
|
- name: Retrieve yt-dlp/FFmpeg-Builds releases with GitHub CLI
|
|
id: ffmpeg
|
|
uses: ./.github/actions/FFmpeg
|
|
- name: Retrieve yt-dlp/yt-dlp releases with GitHub CLI
|
|
id: yt-dlp
|
|
uses: ./.github/actions/yt-dlp
|
|
|
|
docker-image:
|
|
concurrency:
|
|
group: ${{ github.repository }}-${{ github.workflow }}
|
|
cancel-in-progress: false
|
|
needs: ['info']
|
|
uses: docker/github-builder/.github/workflows/build.yml@v1
|
|
permissions:
|
|
contents: read # to fetch the repository content
|
|
id-token: write # for signing attestation(s) with GitHub OIDC Token
|
|
secrets:
|
|
registry-auths: |
|
|
- registry: ${{ needs.info.outputs.REGISTRY }}
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ 'meeb' == github.repository_owner && secrets.REGISTRY_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}
|
|
with:
|
|
cache: false
|
|
# cache-mode: max
|
|
meta-images: ${{ needs.info.outputs.REGISTRY }}/${{ needs.info.outputs.lowercase-github-repository_owner }}/${{ needs.info.outputs.IMAGE_NAME }}
|
|
output: image
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
setup-qemu: false
|
|
meta-flavor: |
|
|
latest=false
|
|
meta-tags: |
|
|
type=raw,value=${{ needs.info.outputs.tag }}
|
|
type=ref,enable=false,event=tag
|
|
build-args: |
|
|
IMAGE_NAME=${{ needs.info.outputs.IMAGE_NAME }}
|
|
FFMPEG_DATE=${{ needs.info.outputs.ffmpeg-date }}
|
|
FFMPEG_VERSION=${{ needs.info.outputs.ffmpeg-version }}
|
|
YTDLP_DATE=${{ fromJSON(needs.info.outputs.ytdlp-latest-release).tag.name }}
|