mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-29 03:56:43 +08:00
fix(ci): publish stable image tags directly (#6436)
This commit is contained in:
@@ -119,7 +119,7 @@ jobs:
|
||||
${{ secrets.DOCKER_USERNAME }}/moviepilot-v3
|
||||
ghcr.io/${{ github.repository }}-v3
|
||||
tags: |
|
||||
type=raw,value=beta-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
type=raw,value=beta
|
||||
|
||||
- name: Docker Meta free-threaded
|
||||
id: meta_ft
|
||||
@@ -129,7 +129,7 @@ jobs:
|
||||
${{ secrets.DOCKER_USERNAME }}/moviepilot-v3t
|
||||
ghcr.io/${{ github.repository }}-v3t
|
||||
tags: |
|
||||
type=raw,value=beta-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
type=raw,value=beta
|
||||
|
||||
- name: Set Up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
@@ -338,18 +338,3 @@ jobs:
|
||||
cache-from: |
|
||||
type=gha,scope=moviepilot-v3t-docker-amd64,version=2
|
||||
type=gha,scope=moviepilot-v3t-docker-arm64,version=2
|
||||
|
||||
- name: Promote beta image pair
|
||||
env:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
run: |
|
||||
candidate="beta-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||
for image in \
|
||||
"${DOCKER_USERNAME}/moviepilot-v3" \
|
||||
"ghcr.io/${GITHUB_REPOSITORY}-v3" \
|
||||
"${DOCKER_USERNAME}/moviepilot-v3t" \
|
||||
"ghcr.io/${GITHUB_REPOSITORY}-v3t"; do
|
||||
docker buildx imagetools create \
|
||||
--tag "${image}:beta" \
|
||||
"${image}:${candidate}"
|
||||
done
|
||||
|
||||
@@ -367,16 +367,17 @@ jobs:
|
||||
env:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
run: |
|
||||
ghcr_repository="${GITHUB_REPOSITORY,,}"
|
||||
for image in \
|
||||
"${DOCKER_USERNAME}/moviepilot-v3" \
|
||||
"ghcr.io/${GITHUB_REPOSITORY}-v3"; do
|
||||
"ghcr.io/${ghcr_repository}-v3"; do
|
||||
docker buildx imagetools create \
|
||||
--tag "${image}:latest" \
|
||||
"${image}:${app_version}"
|
||||
done
|
||||
for image in \
|
||||
"${DOCKER_USERNAME}/moviepilot-v3t" \
|
||||
"ghcr.io/${GITHUB_REPOSITORY}-v3t"; do
|
||||
"ghcr.io/${ghcr_repository}-v3t"; do
|
||||
docker buildx imagetools create \
|
||||
--tag "${image}:latest" \
|
||||
"${image}:${app_version}"
|
||||
|
||||
@@ -223,6 +223,10 @@ def test_release_promotes_latest_only_after_both_versioned_images() -> None:
|
||||
)
|
||||
promote = indexed["Promote latest image pair"]["run"]
|
||||
assert "moviepilot-v3:latest" not in promote
|
||||
assert 'ghcr_repository="${GITHUB_REPOSITORY,,}"' in promote
|
||||
assert "ghcr.io/${GITHUB_REPOSITORY}" not in promote
|
||||
assert "ghcr.io/${ghcr_repository}-v3" in promote
|
||||
assert "ghcr.io/${ghcr_repository}-v3t" in promote
|
||||
assert '"${image}:latest"' in promote
|
||||
assert '"${image}:${app_version}"' in promote
|
||||
|
||||
@@ -263,11 +267,8 @@ def test_beta_applies_the_same_variant_scan_and_publish_contract() -> None:
|
||||
assert "MOVIEPILOT_PYTHON_VARIANT=free-threaded" in indexed[publish_names[1]]["with"]["build-args"]
|
||||
assert "scope=moviepilot-v3-standard-docker-amd64" in indexed[publish_names[0]]["with"]["cache-from"]
|
||||
assert "scope=moviepilot-v3t-docker-amd64" in indexed[publish_names[1]]["with"]["cache-from"]
|
||||
assert "value=beta-${{ github.run_id }}-${{ github.run_attempt }}" in indexed["Docker Meta"]["with"]["tags"]
|
||||
assert "value=beta-${{ github.run_id }}-${{ github.run_attempt }}" in indexed[
|
||||
"Docker Meta free-threaded"
|
||||
]["with"]["tags"]
|
||||
assert all(names.index(name) < names.index("Promote beta image pair") for name in publish_names)
|
||||
promote = indexed["Promote beta image pair"]["run"]
|
||||
assert '"${image}:beta"' in promote
|
||||
assert '"${image}:${candidate}"' in promote
|
||||
assert "value=beta" in indexed["Docker Meta"]["with"]["tags"]
|
||||
assert "value=beta" in indexed["Docker Meta free-threaded"]["with"]["tags"]
|
||||
assert "github.run_id" not in indexed["Docker Meta"]["with"]["tags"]
|
||||
assert "github.run_id" not in indexed["Docker Meta free-threaded"]["with"]["tags"]
|
||||
assert "Promote beta image pair" not in names
|
||||
|
||||
Reference in New Issue
Block a user