1
0
mirror of https://github.com/hanxi/xiaomusic.git synced 2025-12-06 14:52:50 +08:00

Update ci.yml

This commit is contained in:
涵曦
2024-12-19 11:27:10 +08:00
committed by GitHub
parent 25044a8157
commit f7551d6b3e

View File

@@ -153,27 +153,27 @@ jobs:
"cd /app && tar --exclude='ffmpeg' -czf /workspace/app-arm-v7-lite.tar.gz .[!.]* *"
- name: Publish to Docker Hub main
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
context: .
push: true
load: true
tags: ${{ env.TEST_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache-new
cache-to: type=local,dest=/tmp/.buildx-cache-new
# 仅在 ref 为以 v 开头的标签时执行
- name: Publish to Docker Hub latest and stable
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
run: |
# Define the commands to push latest and stable tags
echo "Pushing latest and stable tags..."
docker tag ${{ env.TEST_TAG }} ${{ env.LATEST_TAG }}
docker tag ${{ env.TEST_TAG }} ${{ env.STABLE_TAG }}
docker push ${{ env.LATEST_TAG }}
docker push ${{ env.STABLE_TAG }}
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
context: .
push: true
tags: ${{ env.TEST_TAG }}, ${{ env.LATEST_TAG }}, ${{ env.STABLE_TAG }}
cache-from: type=local,src=/tmp/.buildx-cache-new
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Move cache to limit growth
run: |