name: Build Gradle Dragonwell Image on: push: paths: - '.gitea/workflows/build-image.yml' - 'Dockerfile' - 'config/**' workflow_dispatch: inputs: gradle_version: description: 'Gradle版本' required: true default: '8.13' type: string env: REGISTRY: git.crash.work IMAGE_NAME: gradle-dragonwell jobs: build: runs-on: self_website steps: - name: Check Secret availability run: | echo "Checking if TOKEN secret exists..." if [ -n "${{ secrets.TOKEN }}" ]; then echo "TOKEN secret is available" # 测试token有效性 curl -f -H "Authorization: token ${{ secrets.TOKEN }}" \ https://git.crash.work/api/v1/user/repos | head -5 else echo "TOKEN secret is NOT available" fi