Skip building non-tagged commit when tag is present

How do I stop a commit from building twice, once for the non-tagged version, and once for the tagged-version?

For example, these two builds:

ci-history

In this case, github is triggering two separate hooks, one for the commit and one for the tag. It is currently not possible to limit or prevent two builds, since from Drone’s perspective, these are two separate events.

Instead of skipping the commit, would it work to skip the “tag” event? If so, you could change your repo in Drone to ignore the “tag” event entirely.

(I have a related issue, here, with the inverse of this problem… the commit in question is marked with [ci skip], and it causes both the commit and the tag events to get skipped. You get 2 builds, and I get zero… if only we could each get just one! :wink: )