# Stage with "on: tags: true" runs when no tag for the current commit

**URL:** <https://travis-ci.community/t/stage-with-on-tags-true-runs-when-no-tag-for-the-current-commit/6835>\
**Category:** Deployment\
**Tags:** github-integration\
**Created:** [January 13, 2020, 4:45pm UTC](https://travis-ci.community/t/stage-with-on-tags-true-runs-when-no-tag-for-the-current-commit/6835 "2020-01-13T16:45:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubencabrera](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@rubencabrera](https://travis-ci.community/u/rubencabrera)\
**Post date:** [January 13, 2020, 4:45pm UTC](https://travis-ci.community/t/stage-with-on-tags-true-runs-when-no-tag-for-the-current-commit/6835/1 "2020-01-13T16:45:43Z")

</div>

[https://travis-ci.com/rubencabrera/odoo-docker/builds/144181440](https://travis-ci.com/rubencabrera/odoo-docker/builds/144181440)

I have a deploy stage set up like:

```auto
jobs:
  include:
  [other stages]
  - stage: deploy
    on:
      tags: true
    provider: script
    script:
    - "./.travis/docker_push.bash"
    skip_cleanup: true

```

This stage was running on commits that didn’t have a tag created by the previous stage. You can see on the link that I changed to using the $TRAVIS\_TAG env variable, but it fails. What am I misunderstanding here?

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [March 9, 2020, 11:51pm UTC](https://travis-ci.community/t/stage-with-on-tags-true-runs-when-no-tag-for-the-current-commit/6835/2 "2020-03-09T23:51:38Z")

</div>

5 posts were merged into an existing topic: [Deploy running with deploy.on.tags = true even on non-tag builds](https://travis-ci.community/t/deploy-running-with-deploy-on-tags-true-even-on-non-tag-builds/7511)

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [March 9, 2020, 11:51pm UTC](https://travis-ci.community/t/stage-with-on-tags-true-runs-when-no-tag-for-the-current-commit/6835/3 "2020-03-09T23:51:38Z")

</div>


