Skip to content

Commit d7778fe

Browse files
Merge pull request opendatahub-io#82 from harshad16/fix-pr-wf
Github action: Direct authenticate the skopeo function
2 parents 85ffb2d + f4cc85b commit d7778fe

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

.github/workflows/pr-close-image-delete.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,11 @@ jobs:
1919
run: |
2020
sudo apt-get -y update
2121
sudo apt-get -y install skopeo
22-
- name: Login to quay.io
23-
shell: bash
24-
env:
25-
QUAY_ROBOT_USERNAME: ${{ secrets.QUAY_ROBOT_USERNAME }}
26-
QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }}
27-
run: |
28-
skopeo login quay.io -u ${QUAY_ROBOT_USERNAME} -p ${QUAY_ROBOT_TOKEN}
2922
- name: Delete PR image
3023
shell: bash
3124
env:
3225
PR: ${{ github.event.pull_request.number }}
26+
QUAY_ROBOT_USERNAME: ${{ secrets.QUAY_ROBOT_USERNAME }}
27+
QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }}
3328
run: |
34-
skopeo delete docker://${QUAY_IMAGE_REPO}:pr-${{ env.PR }}
29+
skopeo delete --creds ${QUAY_ROBOT_USERNAME}:${QUAY_ROBOT_TOKEN} docker://${QUAY_IMAGE_REPO}:pr-${{ env.PR }}

0 commit comments

Comments
 (0)