diff --git a/.gitea/workflows/build-image.yml b/.gitea/workflows/build-image.yml index cc66791..25c677a 100644 --- a/.gitea/workflows/build-image.yml +++ b/.gitea/workflows/build-image.yml @@ -23,22 +23,22 @@ jobs: runs-on: self_website steps: - - name: Checkout repository - uses: herryyun/checkout@v4 - with: - token: ${{ secrets.TOKEN }} - - name: Set Gradle version - id: gradle - run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - GRADLE_VERSION="${{ github.event.inputs.gradle_version }}" - else + - name: Checkout repository + uses: herryyun/checkout@v4 + with: + token: ${{ secrets.TOKEN }} + - name: Set Gradle version + id: gradle + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + GRADLE_VERSION="${{ github.event.inputs.gradle_version }}" + else # 推送触发时使用默认版本 - GRADLE_VERSION="8.5" - fi + GRADLE_VERSION="8.5" + fi - echo "version=${GRADLE_VERSION}" >> $GITHUB_OUTPUT - echo "📦 使用Gradle版本: ${GRADLE_VERSION}" + echo "version=${GRADLE_VERSION}" >> $GITHUB_OUTPUT + echo "📦 使用Gradle版本: ${GRADLE_VERSION}" - name: Login to Gitea Container Registry uses: docker/login-action@v3