From 45acd13172f1574e7e683e2839eb4b10e0458c6e Mon Sep 17 00:00:00 2001 From: Daniil Fedotov Date: Tue, 12 Mar 2024 18:01:31 -0400 Subject: [PATCH] build(ci): cleanup docker images in gha runner before building new images (#2734) Follow up to #2711 and #2727 Github keeps some image cache in the GHA runners which keeps around base containers with vulnerabilities. We can't use --pull because we use local-built tools image. --- .github/workflows/main.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 440dbc2f30..ab32dc43ee 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -104,5 +104,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - run: sudo rm -rf /usr/share/dotnet - run: sudo rm -rf "$AGENT_TOOLSDIRECTORY" + - run: docker image prune -af - run: make release-snapshot - run: ./build/push_images.sh