浏览代码

CI: delete artifact after deployments

SukkaW 4 月之前
父节点
当前提交
73fe47852b
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      .github/workflows/main.yml

+ 10 - 0
.github/workflows/main.yml

@@ -224,3 +224,13 @@ jobs:
           GH_EMAIL: ${{ secrets.GIT_EMAIL }}
           GH_USER: ${{ secrets.GIT_USER }}
           GH_TOKEN: ${{ secrets.GIT_TOKEN }}
+  remove_artifacts:
+    needs:
+      - deploy_to_cloudflare_pages
+      - deploy_to_github_gitlab
+    name: Remove Artifacts after Deployment
+    runs-on: ubuntu-slim
+    steps:
+      - uses: geekyeggo/delete-artifact@v5
+        with:
+          name: build-artifact-${{ github.sha }}-${{ github.run_number }}