From 64ee8887f32edf3366f8141178149ac516e162cd Mon Sep 17 00:00:00 2001 From: Yohsuke Fukai Date: Tue, 30 Jan 2024 09:44:34 +0900 Subject: [PATCH] added delete docker on pr close --- .../workflows/delete-docker-on-pr-close.yml | 83 +++++++------------ 1 file changed, 31 insertions(+), 52 deletions(-) diff --git a/.github/workflows/delete-docker-on-pr-close.yml b/.github/workflows/delete-docker-on-pr-close.yml index 2a6d526..0d2ba3c 100644 --- a/.github/workflows/delete-docker-on-pr-close.yml +++ b/.github/workflows/delete-docker-on-pr-close.yml @@ -101,55 +101,34 @@ jobs: type=ref,event=tag,suffix=-cuda type=ref,event=pr,suffix=-cuda -# # Build and push Docker image with Buildx -# # https://github.com/docker/build-push-action -# - name: Build and push Docker image (JAX conda CPU) -# id: build-and-push-jax-conda-cpu -# uses: docker/build-push-action@v5 -# with: -# context: jax_image/ -# platforms: linux/amd64,linux/arm64/v8 -# push: true #${{ github.event_name != 'pull_request' }} -# tags: ${{ steps.meta_jax_conda.outputs.tags }} -# labels: ${{ steps.meta_jax_conda.outputs.labels }} -# build-args: | -# JAX_VERSION=${{ env.JAX_VERSION }} -# -# - name: Build and push Docker image (JAX conda GPU) -# id: build-and-push-jax-conda-gpu -# uses: docker/build-push-action@v5 -# with: -# context: jax_image/ -# platforms: linux/amd64 -# push: true #${{ github.event_name != 'pull_request' }} -# tags: ${{ steps.meta_jax_conda_cuda.outputs.tags }} -# labels: ${{ steps.meta_jax_conda_cuda.outputs.labels }} -# build-args: | -# JAX_VERSION=${{ env.JAX_VERSION }} -# JAX_VERSION_EXTRA=cuda11_local -# BASE_IMAGE=nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04 -# -# - name: Build and push Docker image (CPU) -# id: build-and-push-cpu -# uses: docker/build-push-action@v5 -# with: -# context: . -# platforms: linux/amd64,linux/arm64/v8 -# push: true -# tags: ${{ steps.meta.outputs.tags }} -# labels: ${{ steps.meta.outputs.labels }} -# build-args: | -# BASE_IMAGE=${{ env.REGISTRY }}/${{ env.JAX_CONDA_IMAGE_NAME }}:${{ env.meta_jax_conda_first_tag }} -# -# - name: Build and push Docker image (GPU) -# id: build-and-push-gpu -# uses: docker/build-push-action@v5 -# with: -# context: . -# platforms: linux/amd64 -# push: true -# tags: ${{ steps.meta_cuda.outputs.tags }} -# labels: ${{ steps.meta_cuda.outputs.labels }} -# build-args: | -# BASE_IMAGE=${{ env.REGISTRY }}/${{ env.JAX_CONDA_IMAGE_NAME }}:${{ env.meta_jax_conda_cuda_first_tag }} -# + - name: Delete image (JAX conda CPU) + uses: bots-house/ghcr-delete-image-action@v1.1.0 + with: + owner: yfukai + name: ${{ env.JAX_CONDA_IMAGE_NAME }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.meta_jax_conda.outputs.tags }} + + - name: Delete image (JAX conda GPU) + uses: bots-house/ghcr-delete-image-action@v1.1.0 + with: + owner: yfukai + name: ${{ env.JAX_CONDA_IMAGE_NAME }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.meta_jax_conda_cuda.outputs.tags }} + + - name: Delete image (JAX conda CPU) + uses: bots-house/ghcr-delete-image-action@v1.1.0 + with: + owner: yfukai + name: ${{ env.IMAGE_NAME }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.meta.outputs.tags }} + + - name: Delete image (JAX conda GPU) + uses: bots-house/ghcr-delete-image-action@v1.1.0 + with: + owner: yfukai + name: ${{ env.IMAGE_NAME }} + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.meta_cuda.outputs.tags }}