registry_package doesn't trigger on Docker image push

I have an action that starts with:

name: Deploy updated image to the cloud

on:
  registry_package:
    types: [published]

but despite the Docker image being pushed onto the registry workflow nevers triggers. I’m missing anything, or there some additional steps to undertake for this to work? I fail to notice anything such in the docs here.

Hi @jayarjo ,

Did you use personal access token as a secret to push the docker image? If you use ‘GITHUB_TOKEN’ to push the docker image, ‘registry_package’ event will not be triggered.

And please use below format instead,

on:
  registry_package:
    action:
      - published
      - updated

Checked on my side, It is successful.

Packagetrigger.png

If it doesn’t work for you, please share your repo/sample repo for further investigation.

Thanks.

1 Like

Initially I was trying with GITHUB_TOKEN indeed and then stumbled on a post that mentioned requirement for the personal token (I think documentation for registry_package should also mention this requirement), so I tried that as well - it didn’t work. I definitely tried the syntax in your screenshot as well. In fact it was my initial syntax before I switched to the one mentioned in docs. Nothing worked.

But now it works. The syntax from your screenshot + personal token. Not sure. Thanks anyway!

Hello, can you please check if it triggers on “- updated” only?

on:
registry\_package:
action:  
 - updated