diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index bbaa0d9..c17378f 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -79,10 +79,17 @@ jobs: docker-images: runs-on: ubuntu-latest 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: - 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 with: pattern: binaries-* @@ -110,12 +117,15 @@ jobs: - name: Determine Docker tag id: tag run: | - case "${{ github.ref }}" in - refs/heads/main) TAG="latest" ;; - refs/heads/develop) TAG="develop" ;; - refs/tags/*) TAG="${GITHUB_REF#refs/tags/}" ;; - *) TAG="${{ github.ref_name }}" ;; - esac + if [ "${{ github.ref_name }}" = "main" ]; then + TAG="latest" + elif [ "${{ github.ref_name }}" = "develop" ]; then + TAG="develop" + elif [[ "${{ github.ref }}" == refs/tags/* ]]; then + TAG="${{ github.ref_name }}" + else + TAG="${{ github.ref_name }}" + fi echo "tag=${TAG}" >> $GITHUB_OUTPUT echo "📦 Docker tag: ${TAG}"