From 084ff2994f6eb3ed6f74709c8598e3060f962983 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 27 May 2020 17:33:27 +0200 Subject: [PATCH] ci: add cleanup to CI to remove old tags --- .github/workflows/ci-cleanup.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci-cleanup.yml diff --git a/.github/workflows/ci-cleanup.yml b/.github/workflows/ci-cleanup.yml new file mode 100644 index 000000000..0d24155b0 --- /dev/null +++ b/.github/workflows/ci-cleanup.yml @@ -0,0 +1,38 @@ +name: passbook-ci-cleanup +on: + - delete + +jobs: + delete-server: + runs-on: ubuntu-latest + steps: + - name: Delete docker tag + env: + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + run: curl + -u $DOCKER_USERNAME:$DOCKER_PASSWORD + -X "DELETE" + "https://hub.docker.com/v2/repositories/$DOCKER_USERNAME/passbook/tags/${GITHUB_REF##*/}/" + delete-gatekeeper: + runs-on: ubuntu-latest + steps: + - name: Delete docker tag + env: + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + run: curl + -u $DOCKER_USERNAME:$DOCKER_PASSWORD + -X "DELETE" + "https://hub.docker.com/v2/repositories/$DOCKER_USERNAME/passbook-gatekeeper/tags/${GITHUB_REF##*/}/" + delete-static: + runs-on: ubuntu-latest + steps: + - name: Delete docker tag + env: + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + run: curl + -u $DOCKER_USERNAME:$DOCKER_PASSWORD + -X "DELETE" + "https://hub.docker.com/v2/repositories/$DOCKER_USERNAME/passbook-static/tags/${GITHUB_REF##*/}/"