From c4bd57ba93079185da58d9976a088a514d011ce7 Mon Sep 17 00:00:00 2001 From: hangpersonal Date: Sat, 18 Oct 2025 20:57:21 -0700 Subject: [PATCH] Add .gitea/workflows/*.yaml --- .gitea/workflows/010_ci_docker_image.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/010_ci_docker_image.yaml b/.gitea/workflows/010_ci_docker_image.yaml index fc3de57..c1f7c9b 100644 --- a/.gitea/workflows/010_ci_docker_image.yaml +++ b/.gitea/workflows/010_ci_docker_image.yaml @@ -58,22 +58,20 @@ jobs: steps: - name: Checkout source code uses: actions/checkout@v4 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build and export uses: docker/build-push-action@v5 # Build Docker image via Dockerfile with: context: backend # Directory of Dockerfile tags: ${{ inputs.image-name }}:${{ inputs.image-tag }} outputs: type=docker,dest=/tmp/image.tar - - name: Upload artifact uses: actions/upload-artifact@v3 with: name: image path: /tmp/image.tar + retention-days: 2 integration-tests: runs-on: ubuntu-22.04 @@ -123,6 +121,7 @@ jobs: with: name: trivy-results path: /tmp/trivy-results.json + retention-days: 2 publish-image: runs-on: ubuntu-22.04 @@ -143,4 +142,5 @@ jobs: docker login gitea.cuihang1201.synology.me -u ${{ secrets.REGISTRY_USER }} --password-stdin - name: Push Docker image run: | - docker push ${{ vars.IMAGE }}:${{ inputs.image-tag }} \ No newline at end of file + docker push ${{ inputs.image-name }}:${{ inputs.image-tag }} + docker rmi ${{ inputs.image-name }}:${{ inputs.image-tag }} \ No newline at end of file