From b5df07c86f1459a5a9167d560c26ef9886a96892 Mon Sep 17 00:00:00 2001 From: Chris Doherty Date: Sat, 13 May 2023 10:41:50 -0500 Subject: [PATCH] Attempt using skopeo` Signed-off-by: Chris Doherty --- .github/workflows/latest.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/latest.yaml b/.github/workflows/latest.yaml index 458d5d6a..43ba4d0f 100644 --- a/.github/workflows/latest.yaml +++ b/.github/workflows/latest.yaml @@ -19,6 +19,8 @@ jobs: latest: name: Update latest image tag runs-on: ubuntu-latest + container: + image: alpine:latest steps: - name: Login to quay.io uses: docker/login-action@v2 @@ -27,9 +29,12 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} + - name: Install skopeo + run: | + apk update + apk add skopeo + - name: Tag and push run: | - LATEST=$(curl -H "Accept: application/json" https://api.github.com/repos/tinkerbell/hegel/releases/latest | jq .name -r) - docker pull ${{ env.IMAGE }}:$LATEST - docker tag ${{ env.IMAGE }}:$LATEST ${{ env.IMAGE }}:latest - docker push ${{ env.IMAGE }}:latest + LATEST_RELEASE=$(curl -H "Accept: application/json" https://api.github.com/repos/tinkerbell/hegel/releases/latest | jq .name -r) + skopeo copy docker://${{ env.IMAGE }}:$LATEST_RELEASE docker://${{ env.IMAGE }}:latest