Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt using skopeo #261

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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