Bump softprops/action-gh-release from 2.0.8 to 2.0.9 #242
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: delete-pr-images | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
delete_tags: | |
name: Delete PR images from Dockerhub | |
runs-on: ubuntu-latest | |
steps: | |
- name: dockerhub task | |
env: | |
BRANCH: ${{ github.head_ref }} | |
DOCKER_USER: ${{ secrets.DockerHubUser }} | |
DOCKER_PASS: ${{ secrets.DockerHubToken }} | |
run: | | |
BRANCH=$(echo -n ${BRANCH} | tr -c '[:alnum:]._-' '-') | |
TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${DOCKER_USER}'", "password": "'${DOCKER_PASS}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token) | |
images=("${BRANCH}-latest" "${BRANCH}-runtime" "${BRANCH}-tools" "${BRANCH}-tests-1.31" "${BRANCH}-tests-1.30" "${BRANCH}-tests-1.29" "${BRANCH}-tests-1.28" "${BRANCH}-builder") | |
for i in ${images[*]}; do curl --fail -sS -X DELETE -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/digitalocean/k8s-e2e-test-runner/tags/$i/; done | |
curl --fail -sS -X DELETE -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/digitalocean/do-csi-plugin-dev/tags/${BRANCH}/ |