Triggering a CI/CD build when a tag is added to the GitHub repo this repo is forked from?

549 Views Asked by At

There's a project using GitHub releases to release their packages. I've built a process that repackages the released files and uploads the repackaged files to a special GitHub release in my fork of the repository.

I'd like to fully automate this by having my process run automatically whenever a new GitHub release tag is added to the original repository.

Is there an existing CI/CD service that could do this?

  • If yes which and can you point me to the right area of the docs to figure it out?
  • If no, are there options for wiring this up myself somehow? For example, using a webhook and an existing service in a non-standard way to accomplish the goal?
1

There are 1 best solutions below

1
On

I'd like to fully automate this by having my process run automatically whenever a new GitHub release tag is added to the original repository.

GitHub has webhooks for this purpose.

https://developer.github.com/v3/activity/events/types/#createevent

CreateEvent
Represents a created repository, branch, or tag.

Note: webhooks will not receive this event for created repositories. Additionally, webhooks will not receive this event for tags if more than three tags are pushed at once.

Once the tag is pushed GitHub will invoke the given URL with the appropriate JSON as described in the DOCs above.