Add WaitGroup to ensure consumer has sent all before removing itself #382
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: Clean up PR artifacts | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
delete-docker-hub-pr: | |
name: Delete Docker hub PR image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get token | |
env: | |
CREDS: "{ \"username\": \"${{ secrets.DOCKERHUB_USERNAME }}\", \"password\": \"${{ secrets.DOCKERHUB_TOKEN }}\" }" | |
run: | | |
curl -s -H "Content-Type: application/json" -XPOST -d "$CREDS" \ | |
https://hub.docker.com/v2/users/login/ | \ | |
jq -r '"TOKEN=" + (.token)' >> $GITHUB_ENV | |
- name: Delete PR tag | |
env: | |
TAG: pr-${{ github.event.number }} | |
run: | | |
curl -XDELETE -H "Authorization: JWT ${TOKEN}" \ | |
"https://hub.docker.com/v2/repositories/cloudamqp/lavinmq/tags/${TAG}/" |