From b62e4cc8a37084e7c47f5736760f093ecb15ecaf Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 21 Jul 2026 20:16:56 +0800 Subject: [PATCH] fix: remove artifact upload, build directly in docker job --- .gitea/workflows/build.yml | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 5a3a709..a199647 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -15,8 +15,9 @@ env: IMAGE_NAME: admin/taskpool-react jobs: - build: + build-and-push: runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - name: Checkout uses: actions/checkout@v4 @@ -39,26 +40,6 @@ jobs: working-directory: web run: pnpm build - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: dist - path: web/dist - - docker: - needs: build - runs-on: ubuntu-latest - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Download artifact - uses: actions/download-artifact@v3 - with: - name: dist - path: web/dist - - name: Login to Registry uses: docker/login-action@v3 with: @@ -66,7 +47,7 @@ jobs: username: ${{ secrets.REGISTRY_USER }} password: ${{ secrets.REGISTRY_PASSWORD }} - - name: Build and push + - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . @@ -76,7 +57,7 @@ jobs: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} deploy: - needs: docker + needs: build-and-push runs-on: ubuntu-latest if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: