if a tag is a signed tag, github's hook.After points to the signed tag object sha and not the related commit sha. In this case use hook.HeadCommit.ID.