name: Build and Push Docker Image on: push: branches: [ "main" ] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Docker Buildx # 修正:应该是 docker/ 而不是 actions/ uses: docker/setup-buildx-action@v3 - name: Log in to Gitea Registry # 修正:应该是 docker/login-action uses: docker/login-action@v3 with: registry: git.pengzhan.dev username: ${{ github.actor }} password: ${{ secrets.PUSH_TOKEN }} - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . push: true tags: | git.pengzhan.dev/${{ github.repository }}:latest git.pengzhan.dev/${{ github.repository }}:${{ github.sha }}