修改8
Some checks failed
Build and Release / build-and-test (arm64, alpine) (push) Successful in 8s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 7s
Build and Release / build-and-test (amd64, alpine) (push) Successful in 15s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 14s
Build and Release / docker-images (push) Has been cancelled
Build and Release / release (push) Has been cancelled

This commit is contained in:
2025-12-02 14:17:36 +08:00
parent 305950c6f6
commit beea9f9381

View File

@@ -79,10 +79,17 @@ jobs:
docker-images: docker-images:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build-and-test needs: build-and-test
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/') if: github.ref_name == 'main' || github.ref_name == 'develop' || startsWith(github.ref, 'refs/tags/')
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Debug branch info
run: |
echo "📋 Branch Information:"
echo " github.ref: ${{ github.ref }}"
echo " github.ref_name: ${{ github.ref_name }}"
echo " github.event_name: ${{ github.event_name }}"
- uses: https://github.com/ChristopherHX/gitea-download-artifact@v4 - uses: https://github.com/ChristopherHX/gitea-download-artifact@v4
with: with:
pattern: binaries-* pattern: binaries-*
@@ -110,12 +117,15 @@ jobs:
- name: Determine Docker tag - name: Determine Docker tag
id: tag id: tag
run: | run: |
case "${{ github.ref }}" in if [ "${{ github.ref_name }}" = "main" ]; then
refs/heads/main) TAG="latest" ;; TAG="latest"
refs/heads/develop) TAG="develop" ;; elif [ "${{ github.ref_name }}" = "develop" ]; then
refs/tags/*) TAG="${GITHUB_REF#refs/tags/}" ;; TAG="develop"
*) TAG="${{ github.ref_name }}" ;; elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
esac TAG="${{ github.ref_name }}"
else
TAG="${{ github.ref_name }}"
fi
echo "tag=${TAG}" >> $GITHUB_OUTPUT echo "tag=${TAG}" >> $GITHUB_OUTPUT
echo "📦 Docker tag: ${TAG}" echo "📦 Docker tag: ${TAG}"