mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-02-28 01:13:15 +08:00
release 100.1.0
This commit is contained in:
26
.github/workflows/docker-image.yml
vendored
26
.github/workflows/docker-image.yml
vendored
@@ -12,6 +12,8 @@ on:
|
||||
branches: [ main, master ]
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
release:
|
||||
types: [ published ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -38,6 +40,15 @@ jobs:
|
||||
run: |
|
||||
echo "PLATFORM_NAME=${{ matrix.platform }}" | sed 's|/|-|g' >> $GITHUB_ENV
|
||||
|
||||
- name: Determine Docker tag
|
||||
id: docker-tag
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "release" ]; then
|
||||
echo "tag=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "tag=${{ github.event.inputs.tag || 'latest' }}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -63,6 +74,8 @@ jobs:
|
||||
images: ghcr.io/moontechlab/lunatv
|
||||
tags: |
|
||||
type=raw,value=${{ github.event.inputs.tag || 'latest' }},enable={{is_default_branch}}
|
||||
type=semver,pattern={{version}},enable=${{ github.event_name == 'release' }}
|
||||
type=semver,pattern={{major}}.{{minor}},enable=${{ github.event_name == 'release' }}
|
||||
|
||||
- name: Build and push by digest
|
||||
id: build
|
||||
@@ -72,7 +85,7 @@ jobs:
|
||||
file: ./Dockerfile
|
||||
platforms: ${{ matrix.platform }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: ghcr.io/moontechlab/lunatv:${{ github.event.inputs.tag || 'latest' }}
|
||||
tags: ghcr.io/moontechlab/lunatv:${{ steps.docker-tag.outputs.tag }}
|
||||
outputs: type=image,name=ghcr.io/moontechlab/lunatv,name-canonical=true,push=true
|
||||
|
||||
- name: Export digest
|
||||
@@ -115,10 +128,19 @@ jobs:
|
||||
id: lowercase
|
||||
run: echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Determine Docker tag
|
||||
id: docker-tag
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "release" ]; then
|
||||
echo "tag=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "tag=${{ github.event.inputs.tag || 'latest' }}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Create manifest list and push
|
||||
working-directory: /tmp/digests
|
||||
run: |
|
||||
docker buildx imagetools create -t ghcr.io/moontechlab/lunatv:${{ github.event.inputs.tag || 'latest' }} \
|
||||
docker buildx imagetools create -t ghcr.io/moontechlab/lunatv:${{ steps.docker-tag.outputs.tag }} \
|
||||
$(printf 'ghcr.io/moontechlab/lunatv@sha256:%s ' *)
|
||||
|
||||
cleanup-refresh:
|
||||
|
||||
Reference in New Issue
Block a user