fix: remove artifact upload, build directly in docker job
Build and Deploy / build-and-push (push) Failing after 11s
Build and Deploy / deploy (push) Has been skipped

This commit is contained in:
2026-07-21 20:16:56 +08:00
parent 6d6ab0710e
commit b62e4cc8a3
+4 -23
View File
@@ -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: