Skip to content

How to check if a docker image is already built on GitHub packages #26999

Discussion options

You must be logged in to vote

Hi @jactor-rises , 

You could use docker registry api to get image manifest for Github Package Registry. 

on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check package version
run: |
manifest=$(curl -X GET https://docker.pkg.github.com/v2/{org}/{repo}/{image name}/manifests/$GITHUB_SHA -u $GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }} | jq '.')
echo $manifest

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Packages Host your dependencies, libraries, and production-ready code, right from your repository Product Feedback
3 participants