Unable to get a docker-based GitHub Packages registry_package event from a GitHub Actions workflow

I added a workflow that publishes to GitHub Packages (docker) on the creation of a release.  Then I added another workflow to activate on registry_package, however that event is not firing at all.

I made a forkable project that demonstrates this problem.  I am trying to use registry_package to trigger a qualification test run on my release docker image… but it never fires.  I’m hoping that I’m just doing something silly, otherwise this looks like a problem at GitHub.

https://github.com/jeking3/no-github-package-docker-registry-package-event

The only action that shows up is the “release” action which indeed publishes a package, however I never get a registry_package workflow event to trigger qualify.yaml.

1 Like

The root cause is that an action in a workflow run which act with GITHUB_TOKEN can’t trigger a new workflow run. In your workflow, you login github docker registry with GITHUB_TOKEN. This make the docker image push operation act with GITHUB_TOKEN. So your workflow on: registry_package will not be triggered. 

Please create a Personal Access Token with write:packages scope and store its value to secrets. Then use this secret variable in docker login step:

docker login.png

1 Like

Thanks, that’s good information.  Is that in the documentation?  

1 Like

There is the document:

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#about-workflow-events 

1 Like