From 392e43d0fe7a60698deef755187443e09a72f09f Mon Sep 17 00:00:00 2001 From: saxix Date: Fri, 5 Jul 2024 18:30:51 +0200 Subject: [PATCH] updates --- .github/workflows/delete_image.yml | 49 ------------------------------ 1 file changed, 49 deletions(-) delete mode 100644 .github/workflows/delete_image.yml diff --git a/.github/workflows/delete_image.yml b/.github/workflows/delete_image.yml deleted file mode 100644 index 7d51ec6..0000000 --- a/.github/workflows/delete_image.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Branch Deleted -on: delete -jobs: - delete: - if: github.event.ref_type == 'branch' - runs-on: ubuntu-latest - steps: - - name: Install regctl - uses: regclient/actions/regctl-installer@main - - name: regctl login - uses: regclient/actions/regctl-login@main - with: - registry: docker.io - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - shell: bash - run: | - ref="${{github.event.ref}}" - tag=$(echo $ref | sed -e "s#refs/heads/##g" | sed -e s#/#-##g) - name="${{vars.DOCKER_IMAGE}}:test-${{github.event.ref}}" - echo "Delete $name" -# - name: Delete Test Docker Image -# shell: bash -# run: | -# name="${{vars.DOCKER_IMAGE}}:test-${{github.event.ref}}" -# registry="https://registry-1.docker.io" -# curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$( -# curl -sSL -I \ -# -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \ -# "http://${registry}/v2/${name}/manifests/$( -# curl -sSL "http://${registry}/v2/${name}/tags/list" | jq -r '.tags[0]' -# )" \ -# | awk '$1 == "Docker-Content-Digest:" { print $2 }' \ -# | tr -d $'\r' \ -# )" -# - name: Delete linked Docker Image -# shell: bash -# run: | -# name="${{vars.DOCKER_IMAGE}}:${{github.event.ref}}" -# registry="https://registry-1.docker.io" -# curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$( -# curl -sSL -I \ -# -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \ -# "http://${registry}/v2/${name}/manifests/$( -# curl -sSL "http://${registry}/v2/${name}/tags/list" | jq -r '.tags[0]' -# )" \ -# | awk '$1 == "Docker-Content-Digest:" { print $2 }' \ -# | tr -d $'\r' \ -# )"