Skip to content

Commit

Permalink
Fix docker hub authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkornel committed Aug 27, 2024
1 parent 8b00fc8 commit 3f9b25a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/pr-image-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ jobs:
name: Delete Docker Image Tag from DockerHub
runs-on: ubuntu-latest
steps:
- name: Get Docker Hub Token
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
run: |
TOKEN=$(curl -s -X POST "https://hub.docker.com/v2/users/login/" \
-H "Content-Type: application/json" \
-d '{"username": "'$DOCKER_USER'", "password": "'$DOCKER_TOKEN'"}' | jq -r .token)
echo "token=$TOKEN" >> $GITHUB_ENV
- name: Delete Docker Image Tag
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
Expand Down

0 comments on commit 3f9b25a

Please sign in to comment.