# Tag workflow doesn't work, despite similar setup on other project working

**URL:** <https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514>\
**Category:** Build Environment\
**Tags:** 2.0, github, workflow, circle-yml\
**Created:** [May 23, 2019, 1:23am UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514 "2019-05-23T01:23:37Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkobit](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/mkobit/32/15808_2.png) [@mkobit](https://discuss.circleci.com/u/mkobit)\
**Post date:** [May 23, 2019, 1:23am UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514/1 "2019-05-23T01:23:37Z")

</div>

I’ve tried to set up and execute a workflow for one of my projects where I want to automate publishing using Circle CI. Despite the confusing filtering user experience documented at [https://circleci.com/docs/2.0/workflows/#using-contexts-and-filtering-in-your-workflows](https://circleci.com/docs/2.0/workflows/#using-contexts-and-filtering-in-your-workflows) , I got it to work one of my projects.

- tag: [https://github.com/mkobit/gradle-test-kotlin-extensions/tree/0.7.0](https://github.com/mkobit/gradle-test-kotlin-extensions/tree/0.7.0)

- workflow: [https://github.com/mkobit/gradle-test-kotlin-extensions/blob/721812c91e7eb9a5dd475bdd619ad95a0c404704/.circleci/config.yml#L98-L122](https://github.com/mkobit/gradle-test-kotlin-extensions/blob/721812c91e7eb9a5dd475bdd619ad95a0c404704/.circleci/config.yml#L98-L122)

- workflow run: [https://circleci.com/workflow-run/f769d441-5804-4913-9b64-611abae06021](https://circleci.com/workflow-run/f769d441-5804-4913-9b64-611abae06021)

Now, I’ve tried to apply the same type of concept to another project that has a forking workflow.

- tag [https://github.com/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/tree/0.9.0](https://github.com/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/tree/0.9.0)

- workflow: [https://github.com/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/blob/bd0f462ae17e5e4630e528ce7db9f755279735fc/.circleci/config.yml#L146-L198](https://github.com/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/blob/bd0f462ae17e5e4630e528ce7db9f755279735fc/.circleci/config.yml#L146-L198)

The pipeline runs for branches but my `publish` job doesn’t run, and no workflow execution is created for my `0.9.0` tag linked above. I can see the webhook events being sent by GitHub and a big green checkmark shows me it is being delivered.

Why isn’t this working? What is wrong with my workflow definition?

---

<div class="post-metadata">

**Author:** ![drazisil](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/drazisil/32/24029_2.png) [@drazisil](https://discuss.circleci.com/u/drazisil)\
**Post date:** [May 23, 2019, 1:52pm UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514/2 "2019-05-23T13:52:32Z")

</div>

Hi Mike. Can you share the payload ID for the hook for `0.9.0` so I can check the logs?

You can also [open a ticket](https://support.circleci.com/hc/en-us/requests/new) if you would prefer to share the information privately, just reference this thread if you do.

---

<div class="post-metadata">

**Author:** ![mkobit](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/mkobit/32/15808_2.png) [@mkobit](https://discuss.circleci.com/u/mkobit)\
**Post date:** [May 23, 2019, 2:30pm UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514/3 "2019-05-23T14:30:16Z")

</div>

I think the ID of the payload wouldn’t be sensitive, right?

/shrug

The ID is `cbf5ad80-7cf8-11e9-9045-ae1cdbef82d5` sent to [https://circleci.com/hooks/github](https://circleci.com/hooks/github)

---

<div class="post-metadata">

**Author:** ![drazisil](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/drazisil/32/24029_2.png) [@drazisil](https://discuss.circleci.com/u/drazisil)\
**Post date:** [May 23, 2019, 2:37pm UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514/4 "2019-05-23T14:37:54Z")

</div>

_I_ don’t consider it as such, but people have different ideas of what they consider sensitive, so I like to provide options.

I’m not seeing this ID in the logs, do you know when it was sent? I wonder if it was during GitHub’s web hook issue yesterday and was somehow lost.

---

<div class="post-metadata">

**Author:** ![mkobit](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/mkobit/32/15808_2.png) [@mkobit](https://discuss.circleci.com/u/mkobit)\
**Post date:** [May 23, 2019, 3:10pm UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514/5 "2019-05-23T15:10:00Z")

</div>

That’s a bummer. I’m seeing **2019-05-22 20:19:22** on the webhook page (not sure what timezone it is on there, but would guess CDT? Or maybe mountain time?). I wasn’t seeing issues with branches around the same time, which is when I came and wrote this post.

A few of the response headers (not sure if they are useful for you) shown on GitHub for that event:

```auto
Date: Thu, 23 May 2019 01:19:22 GMT
x-client-trace-id: 
x-request-id: 94459908-fc53-4788-9f77-7bab1a8d8ac6
X-route: /hooks/github

```

---

<div class="post-metadata">

**Author:** ![drazisil](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/drazisil/32/24029_2.png) [@drazisil](https://discuss.circleci.com/u/drazisil)\
**Post date:** [May 23, 2019, 5:15pm UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514/6 "2019-05-23T17:15:22Z")

</div>

All I can find is [https://circleci.com/workflow-run/0613d5ff-4acb-48ea-bd2f-a4154d54f98f](https://circleci.com/workflow-run/0613d5ff-4acb-48ea-bd2f-a4154d54f98f)

I suspect we treated it as a duplicate build, can you provide the commit id for the tag? Maybe I can locate it that way.

---

<div class="post-metadata">

**Author:** ![drazisil](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/drazisil/32/24029_2.png) [@drazisil](https://discuss.circleci.com/u/drazisil)\
**Post date:** [May 23, 2019, 6:20pm UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514/7 "2019-05-23T18:20:46Z")

</div>

Hey Mike. I did some code diving, can I ask how you created the `0.9.0` tag?

We only act on the following hook events `"push", "pull_request", "public", "fork"` so if it was via cutting a new release we would not have run it it as we would have expected the commit to have already built.

I feel like we are looking at a feature request her, but need to get all the details so I can make it as clear as possible.

---

<div class="post-metadata">

**Author:** ![mkobit](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/mkobit/32/15808_2.png) [@mkobit](https://discuss.circleci.com/u/mkobit)\
**Post date:** [May 23, 2019, 9:10pm UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514/8 "2019-05-23T21:10:54Z")

</div>

Thanks for digging in, and sorry for not responding sooner.

## Commit SHA for 0.9.0 tag

SHA (which you probably already figured out): `bd0f462ae17e5e4630e528ce7db9f755279735fc`

## Copy of event JSON

```json
{
  "ref": "0.9.0",
  "ref_type": "tag",
  "master_branch": "master",
  "description": "Gradle plugin to help with build and test of Jenkins Pipeline Shared Libraries (see https://jenkins.io/doc/book/pipeline/shared-libraries/)",
  "pusher_type": "user",
  "repository": {
    "id": 99977858,
    "node_id": "MDEwOlJlcG9zaXRvcnk5OTk3Nzg1OA==",
    "name": "jenkins-pipeline-shared-libraries-gradle-plugin",
    "full_name": "mkobit/jenkins-pipeline-shared-libraries-gradle-plugin",
    "private": false,
    "owner": {
      "login": "mkobit",
      "id": 1447148,
      "node_id": "MDQ6VXNlcjE0NDcxNDg=",
      "avatar_url": "https://avatars3.githubusercontent.com/u/1447148?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/mkobit",
      "html_url": "https://github.com/mkobit",
      "followers_url": "https://api.github.com/users/mkobit/followers",
      "following_url": "https://api.github.com/users/mkobit/following{/other_user}",
      "gists_url": "https://api.github.com/users/mkobit/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/mkobit/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/mkobit/subscriptions",
      "organizations_url": "https://api.github.com/users/mkobit/orgs",
      "repos_url": "https://api.github.com/users/mkobit/repos",
      "events_url": "https://api.github.com/users/mkobit/events{/privacy}",
      "received_events_url": "https://api.github.com/users/mkobit/received_events",
      "type": "User",
      "site_admin": false
    },
    "html_url": "https://github.com/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin",
    "description": "Gradle plugin to help with build and test of Jenkins Pipeline Shared Libraries (see https://jenkins.io/doc/book/pipeline/shared-libraries/)",
    "fork": false,
    "url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin",
    "forks_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/forks",
    "keys_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/teams",
    "hooks_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/hooks",
    "issue_events_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/issues/events{/number}",
    "events_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/events",
    "assignees_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/assignees{/user}",
    "branches_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/branches{/branch}",
    "tags_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/tags",
    "blobs_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/languages",
    "stargazers_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/stargazers",
    "contributors_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/contributors",
    "subscribers_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/subscribers",
    "subscription_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/subscription",
    "commits_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/issues/comments{/number}",
    "contents_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/contents/{+path}",
    "compare_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/merges",
    "archive_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/downloads",
    "issues_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/issues{/number}",
    "pulls_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/labels{/name}",
    "releases_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/releases{/id}",
    "deployments_url": "https://api.github.com/repos/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/deployments",
    "created_at": "2017-08-11T01:09:26Z",
    "updated_at": "2019-05-23T01:15:20Z",
    "pushed_at": "2019-05-23T01:19:22Z",
    "git_url": "git://github.com/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin.git",
    "ssh_url": "git@github.com:mkobit/jenkins-pipeline-shared-libraries-gradle-plugin.git",
    "clone_url": "https://github.com/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin.git",
    "svn_url": "https://github.com/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin",
    "homepage": null,
    "size": 830,
    "stargazers_count": 70,
    "watchers_count": 70,
    "language": "Kotlin",
    "has_issues": true,
    "has_projects": true,
    "has_downloads": true,
    "has_wiki": true,
    "has_pages": false,
    "forks_count": 9,
    "mirror_url": null,
    "archived": false,
    "disabled": false,
    "open_issues_count": 31,
    "license": {
      "key": "mit",
      "name": "MIT License",
      "spdx_id": "MIT",
      "url": "https://api.github.com/licenses/mit",
      "node_id": "MDc6TGljZW5zZTEz"
    },
    "forks": 9,
    "open_issues": 31,
    "watchers": 70,
    "default_branch": "master"
  },
  "sender": {
    "login": "mkobit",
    "id": 1447148,
    "node_id": "MDQ6VXNlcjE0NDcxNDg=",
    "avatar_url": "https://avatars3.githubusercontent.com/u/1447148?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/mkobit",
    "html_url": "https://github.com/mkobit",
    "followers_url": "https://api.github.com/users/mkobit/followers",
    "following_url": "https://api.github.com/users/mkobit/following{/other_user}",
    "gists_url": "https://api.github.com/users/mkobit/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/mkobit/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/mkobit/subscriptions",
    "organizations_url": "https://api.github.com/users/mkobit/orgs",
    "repos_url": "https://api.github.com/users/mkobit/repos",
    "events_url": "https://api.github.com/users/mkobit/events{/privacy}",
    "received_events_url": "https://api.github.com/users/mkobit/received_events",
    "type": "User",
    "site_admin": false
  }
}

```

## Subset of what is enabled on GitHub

![Subset of Circle Webhook](https://global.discourse-cdn.com/circleci/original/3X/7/0/70957e65873ef04667a2ba2130a07015ee360565.png)

## How I Created the Tag

Locally executed both of the commands to tag the commit:

```auto
git tag 0.9.0 --sign --annotate --message="Latest Jenkins LTS and plugin versions and fix authentication headers for JenkinsIntegrationPlugin"
git push origin 0.9.0

```

---

<div class="post-metadata">

**Author:** ![drazisil](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/drazisil/32/24029_2.png) [@drazisil](https://discuss.circleci.com/u/drazisil)\
**Post date:** [May 23, 2019, 9:14pm UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514/9 "2019-05-23T21:14:33Z")

</div>

No worries. Can you share the headers too? Specifically, I need to know the `X-GitHub-Event:` one, if it’s not one of the above that’s why we ignored it.

That SHA built under [https://circleci.com/workflow-run/61008446-9a82-45d5-b29f-2eb622dd89bf](https://circleci.com/workflow-run/61008446-9a82-45d5-b29f-2eb622dd89bf)

---

<div class="post-metadata">

**Author:** ![mkobit](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/mkobit/32/15808_2.png) [@mkobit](https://discuss.circleci.com/u/mkobit)\
**Post date:** [May 23, 2019, 9:33pm UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514/10 "2019-05-23T21:33:57Z")

</div>

Here are the headers, only one I left out was the content of `X-Hub-Signature`.

- `Request URL: https://circleci.com/hooks/github`
- `Request method: POST`
- `content-type: application/x-www-form-urlencoded`
- `Expect:`
- `User-Agent: GitHub-Hookshot/4e8a459`
- `X-GitHub-Delivery: cbf5ad80-7cf8-11e9-9045-ae1cdbef82d5`
- `X-GitHub-Event: create`

---

<div class="post-metadata">

**Author:** ![drazisil](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/drazisil/32/24029_2.png) [@drazisil](https://discuss.circleci.com/u/drazisil)\
**Post date:** [May 23, 2019, 9:40pm UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514/11 "2019-05-23T21:40:42Z")

</div>

> [@mkobit](#):
>
> X-GitHub-Event: create

As a create event, we would ignore this. The commit did run on CircleCI under [https://circleci.com/workflow-run/61008446-9a82-45d5-b29f-2eb622dd89bf](https://circleci.com/workflow-run/61008446-9a82-45d5-b29f-2eb622dd89bf), we would not re-run it with a tag creation since it didn’t change.

We build it when we received

```auto
x_github_delivery
3b05206c-7cf8-11e9-8408-10d52a86dc4e

```

---

<div class="post-metadata">

**Author:** ![mkobit](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/mkobit/32/15808_2.png) [@mkobit](https://discuss.circleci.com/u/mkobit)\
**Post date:** [May 24, 2019, 3:06am UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514/12 "2019-05-24T03:06:06Z")

</div>

Ok, that is _really_ strange.

On the other project mentioned with what I believe to be the same setup for tag [https://github.com/mkobit/gradle-test-kotlin-extensions/commits/0.7.0](https://github.com/mkobit/gradle-test-kotlin-extensions/commits/0.7.0)

- Webhook ID: `bc506d58-7ce3-11e9-9ddd-bb6832ae82f5`
- `X-GitHub-Event: push`

I do the same push pattern on both repositories, so now I’m definitely confused.

This seems like the right setup to enable a certain job to run for tags, but it seems that either there is an issue on GitHub’s side or I have something set up wrong. Any thoughts or suggestions?

---

<div class="post-metadata">

**Author:** ![mkobit](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/mkobit/32/15808_2.png) [@mkobit](https://discuss.circleci.com/u/mkobit)\
**Post date:** [May 28, 2019, 2:25pm UTC](https://discuss.circleci.com/t/tag-workflow-doesnt-work-despite-similar-setup-on-other-project-working/30514/13 "2019-05-28T14:25:15Z")

</div>

I tried deleting and repushing the tag, and event Id `fd75a182-8151-11e9-8271-4e026a883dc8`

with headers

```auto
Request URL: https://circleci.com/hooks/github
Request method: POST
content-type: application/x-www-form-urlencoded
Expect: 
User-Agent: GitHub-Hookshot/8a8ac33
X-GitHub-Delivery: fd75a182-8151-11e9-8271-4e026a883dc8
X-GitHub-Event: push

```

and body starting with

```json
{
  "ref": "refs/tags/0.9.0",
  "before": "0000000000000000000000000000000000000000",
  "after": "416436bb8d081e541caaee4942cb5119c1736724",
  "created": true,
  "deleted": false,
  "forced": false,
  "base_ref": null,
  
   ...
}

```

Didn’t trigger anything Circle CI side.

¯\_(ツ)_/¯ guess I’ll try and figure it out again on my next tag.
