[SOLVED] Build runs even when the reason is explicitly excluded

Hey there,
I’m running into a little issue I can’t figure out. I’ve got a repository which should only run on tag, so I did as per the triggers documentation.

triggers:
    event:
    - tag

This didn’t exactly work, the build was still triggered on a push event, so changed it to:

triggers:
  event:
    include:
    - tag
    exclude:
    - push

as to explicitly disable push events, this didn’t work either so I changed it to:

triggers:
  event:
    include:
    - tag
    exclude:
    - push
  branch:
    exclude:
    - '*'

Which also does not work. The build is still being run on a commit.
After looking at the build info, I tried excluding the ref:

triggers:
  event:
    include:
    - tag
    exclude:
    - push
  branch:
    exclude:
    - '*'
  ref:
    exclude:
    - ref/heads/*

This didn’t work either.
Honestly I’m completely lost at this point.

Here’s my build info:

{
    "id": 129,
    "repo_id": 112,
    "trigger": "@hook",
    "number": 12,
    "status": "killed",
    "event": "push",
    "action": "",
    "link": "https://github.com/TwinsightMedia/ContentDashboardAPI/compare/89da55ab5d90...fae731002e34",
    "timestamp": 0,
    "message": "drone.yml",
    "before": "89da55ab5d90e2168db64595b6f01f15a6e838af",
    "after": "fae731002e34588e46ce87d7666c86fa75e521ee",
    "ref": "refs/heads/master",
    "source_repo": "",
    "source": "master",
    "target": "master",
    "author_login": "TheDutchMC",
    "author_name": "Tobias de Bruijn",
    "author_email": "github@thedutchmc.nl",
    "author_avatar": "https://avatars.githubusercontent.com/u/28569170?v=4",
    "sender": "TheDutchMC",
    "started": 1617955374,
    "finished": 1617955384,
    "created": 1617955374,
    "updated": 1617955374,
    "version": 3,
    "stages": [
        {
            "id": 128,
            "repo_id": 112,
            "build_id": 129,
            "number": 1,
            "name": "TwinsightContentDashboard-API",
            "kind": "pipeline",
            "type": "kubernetes",
            "status": "killed",
            "errignore": false,
            "exit_code": 0,
            "machine": "drone-deployment-5f967866c-78jgq",
            "os": "linux",
            "arch": "amd64",
            "started": 1617955374,
            "stopped": 1617955384,
            "created": 1617955374,
            "updated": 1617955374,
            "version": 4,
            "on_success": true,
            "on_failure": false,
            "steps": [
                {
                    "id": 528,
                    "step_id": 128,
                    "number": 1,
                    "name": "clone",
                    "status": "success",
                    "exit_code": 0,
                    "started": 1617955374,
                    "stopped": 1617955378,
                    "version": 3
                },
                {
                    "id": 529,
                    "step_id": 128,
                    "number": 2,
                    "name": "Build Docker image",
                    "status": "killed",
                    "exit_code": 130,
                    "started": 1617955378,
                    "stopped": 1617955384,
                    "version": 3
                },
                {
                    "id": 530,
                    "step_id": 128,
                    "number": 3,
                    "name": "Slack notifications",
                    "status": "skipped",
                    "exit_code": 130,
                    "started": 1617955384,
                    "stopped": 1617955384,
                    "version": 2
                }
            ]
        }
    ]
}

Any help would be appreciated!

there is a typo in your yaml:

-triggers:
+trigger:
  event:
  - tag

Yep that was it!

Thank you so much! I wouldn’t have spotted it :smiley: