Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action is confused by the other tags #71

Closed
gukoff opened this issue Mar 23, 2021 · 3 comments · Fixed by #171
Closed

Action is confused by the other tags #71

gukoff opened this issue Mar 23, 2021 · 3 comments · Fixed by #171

Comments

@gukoff
Copy link

gukoff commented Mar 23, 2021

Problem

I'm running the action on the repo where the recent tags aren't in the semver format \d+\.\d+\.\d+.
E.g. there's v2.0.0 (starts with v), a/b/c/d/e (letters), 123123123 (just digits).

I'm expecting the action to find and bump the tag that's in the right format but that isn't the most recent: 10.10.10.

The action correctly find it, but when it tries to bump the version, it ends up with 10.10.11-refs/tags/v2.0.0.0 and fails.

Action log

Run mathieudutour/[email protected]
  with:
    github_token: ***
    default_bump: patch
    release_branches: master,main
    create_annotated_tag: false
    dry_run: false
Previous tag was 10.10.10, previous version was 10.10.10.                  <-- found the right tag to bump 
Analyzing commit: Update ci.yml
The commit should not trigger a release
Analyzing commit: Update ci.yml
The commit should not trigger a release
Analyzing commit: Update ci.yml
The commit should not trigger a release
Analyzing commit: Update ci.yml
The commit should not trigger a release
Analyzing commit: r:x
The commit should not trigger a release
Analysis of 5 commits complete: no release
Error: 10.10.11-refs/tags/v2.0.0.0 is not a valid semver.                  <-- weird result of the bump

Tags in the repo

$ git for-each-ref --sort=-v:refname

4a91d1d7c66bacc8a8e1217bafddeadba216a69b commit	refs/tags/v2.0.0
c3dfda08a6968213f6176fc5f3a275a816caf8a8 commit	refs/tags/v1.0.0
6da577d61edfd17941b5ad91e97ec66bbcf54ae7 commit	refs/tags/a/b/c/d/e
f02c883fdb274dcde9b28c0f8ba34b60bdf72c43 commit	refs/tags/123123123
6da577d61edfd17941b5ad91e97ec66bbcf54ae7 commit	refs/tags/10.10.10
6da577d61edfd17941b5ad91e97ec66bbcf54ae7 commit	refs/tags/10.10.8
6da577d61edfd17941b5ad91e97ec66bbcf54ae7 commit	refs/tags/10.10.1
6da577d61edfd17941b5ad91e97ec66bbcf54ae7 commit	refs/tags/10.6.9
6da577d61edfd17941b5ad91e97ec66bbcf54ae7 commit	refs/tags/10.0.0
6da577d61edfd17941b5ad91e97ec66bbcf54ae7 commit	refs/tags/2.0.100
6da577d61edfd17941b5ad91e97ec66bbcf54ae7 commit	refs/tags/2.0.0
062ae2a2624bbdd4a5341fee5a78fad944e96804 tag	refs/tags/1.1.1
f02c883fdb274dcde9b28c0f8ba34b60bdf72c43 commit	refs/tags/1.1.0
ede7d8d7268e84d738e9801a368a86d9a8cb47d7 commit	refs/tags/1.0.0
1e93f600f4b4320f2f09ef8754de1e782a3a901c commit	refs/tags/0.2.0
3c7bd2d8f5b95a752060d51c6673c36b192659dc commit	refs/tags/0.1.2
80dfeecb5312bb897ab83c5fd81ad007ec5d1a37 commit	refs/tags/0.1.1
12f0ef7b37c33f3ae6271e69b3fb1d0936d3a2f4 commit	refs/tags/0.1.0
c3dfda08a6968213f6176fc5f3a275a816caf8a8 commit	refs/remotes/origin/master
4a91d1d7c66bacc8a8e1217bafddeadba216a69b commit	refs/heads/master
@bkimbrough88
Copy link

I'm running into a similar problem, I have multiple tags in the repo indicating which worklfow in my mono repo did the tagging.

Action configuration

    steps:
      - name: git checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Increment Tag
        id: tag
        uses: mathieudutour/[email protected]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          tag_prefix: aws-dns-v

Action Log

Previous tag was aws-dns-v0.0.0, previous version was 0.0.0.
Analysis of 0 commits complete: no release
New version is 0.0.1.
New tag after applying prefix is aws-dns-v0.0.1.
Changelog is ### [0.0.1](https://github.com/Bandwidth/systems_terraform/compare/aws-dns-v0.0.0...aws-dns-v0.0.1) (2021-06-18)

.
Error: Reference already exists1

Tags in Repo

git for-each-ref --sort=-v:refname
warning: ignoring broken ref refs/remotes/origin/HEAD
69c106bb0296676029de6ae619a42166fb125558 commit refs/tags/aws-v1.1.56
c52bcf215805071197fe0191767a6c1cb6f7d7e8 commit refs/tags/aws-v1.1.55
fd845c8c3ab79f2bc5c60a990585500306a7821b commit refs/tags/aws-v1.1.53
ac98f48292b1f2c12ba68abdc904fdbbd534fee9 commit refs/tags/aws-v1.1.52
9b84121dd848cab66cff0b7c839ee5e2cd4db89d commit refs/tags/aws-v1.1.51
c3324ecb10b590b99772cea4293fdcca3cd7367c commit refs/tags/aws-v1.1.50
a4d624214a5ce4cf6c0bf108905babb09b7043ef commit refs/tags/aws-v1.1.49
dedd34007ec7fbbe43dc403e29563487a1755448 commit refs/tags/aws-v1.1.48
4341ef1b11478fb659dc120fd6257e47e2f87d74 commit refs/tags/aws-v1.1.47
b03ef55c41ec13df20fded3f16dca284d3206bcd commit refs/tags/aws-v1.1.46
a5c467233ec5224272ea09d45acb4a198ae0492b commit refs/tags/aws-v1.1.45
72afdaa9a054028791c7c94ca1f9e639a96b5bc1 commit refs/tags/aws-v1.1.42
7bee000c6cf1ab99b2237b09586c7c6a999e6003 commit refs/tags/aws-v1.1.41
54dd946da06519613d7314e716c3a0c0161ef572 commit refs/tags/aws-v1.1.40
bc7ba7f794fdb772f544cf053344083c5e64df42 commit refs/tags/aws-v1.1.39
eb07dac9feb385d7824cde37c019418050cfb239 commit refs/tags/aws-v1.1.38
d8309f732220fd3d9dedbedaa5d0f3a54f543bbd commit refs/tags/aws-v1.1.35
3ce9fe0d30f4f71eef0887a7d33c8d59b8774bbd commit refs/tags/aws-v1.1.34
ca861a9ac33aead45ecb4429523ebb58fdf7786f commit refs/tags/aws-v1.1.33
5943cd4e283cfc0a30124a9481fa620e0259b93c commit refs/tags/aws-v1.1.32
3547351a27e8db3e44f6a315b2a67845c9deb4a6 commit refs/tags/aws-v1.1.31
db2d88341da973ce91d42a0af95e770e7efc6518 commit refs/tags/aws-v1.1.30
4b11c6e40a499ea72ac23ae41d3641b811ead6bf commit refs/tags/aws-v1.1.27
b580734e217c989a14cd6b8927925754a1cb2aac commit refs/tags/aws-v1.1.26
51cb2348aeb7398fa5b0ff8ef4b91a2c3711a1cd commit refs/tags/aws-v1.1.25
8de51f0f388c8aa180df6c009339208929d26ca0 commit refs/tags/aws-v1.1.24
d186eccdd327f2bcb22a1cbbe2d642a32d440fff commit refs/tags/aws-v1.1.23
c1007320a63a5e0a80434770e6a113258b90c4fd commit refs/tags/aws-v1.1.21
bfb4de6940d8a9e6e393570d1d1f298ee37e52b5 commit refs/tags/aws-v1.1.20
8c2793a58e45753d2954762492c9b07022413198 commit refs/tags/aws-v1.1.19
ac8e894226ab84414c1b6007aa8538b7d2442288 commit refs/tags/aws-v1.1.18
3832d76092a803b5544c42857b0e98fcb17e8bcf commit refs/tags/aws-v1.1.17
7d5376f899e643b9bd0cc5372071738cd758f434 commit refs/tags/aws-v1.1.16
4da8c98b3b4e7a2061236747b02ca0b98d87d0a4 commit refs/tags/aws-v1.1.15
daaa9e070bc378855f62c9d550da2edad97e35b7 commit refs/tags/aws-v1.1.14
7db37f386d955a26c1357d26156188ce2fa805b5 commit refs/tags/aws-v1.1.13
47032976a297cf37a758ada48ed47577878491a2 commit refs/tags/aws-v1.1.12
ee8a0a5b5418a7bd4e6877a881fcdfdd2f5d6c18 commit refs/tags/aws-v1.1.11
9e93b446ee6fe2d9986031e596d92cc0d70313b7 commit refs/tags/aws-v1.1.10
6559e107865a3ed9d4635afdef868b7c11ee3f06 commit refs/tags/aws-v1.1.9
86a390ac31cc37ab12ad4871ecb0f8572b3d1b55 commit refs/tags/aws-v1.1.8
d7e4e478372f73a0586b5c98847b2aff8b6d419a commit refs/tags/aws-v1.1.7
6c5cc6e1de637948c4da9ece1aae20fffec9afd7 commit refs/tags/aws-v1.1.6
623db880fc880e0de62783db0b94b1edf9b9dd36 commit refs/tags/aws-v1.1.5
3b9905b9964e32e47806c6ef524007066ee41954 commit refs/tags/aws-v1.1.4
3b09b3600f0b2c5274c90975fb67082ef6f59546 commit refs/tags/aws-v1.1.3
a9adf4a320f6505e1a24f1e6d0aced0a778c3d08 commit refs/tags/aws-v1.1.2
b2d11aadced6d60e4a99075ac51525e23c9ea18c commit refs/tags/aws-v1.1.1
e205593dcb01061c08e1ae7c6e325d5d363edb47 commit refs/tags/aws-v1.1.0
681f7958b94911ab3c6a49001d3ac7ccfd7b4b59 commit refs/tags/aws-v1.0.82
512390ffba3bcba93a74e3c13b0e2ffb20c824ad commit refs/tags/aws-v1.0.81
169a22f1b5e8d2f199e06dce55127aa5ac00bca4 commit refs/tags/aws-v1.0.80
efe57902a892e6e400918e35c179ee9317c40094 commit refs/tags/aws-v1.0.79
56925b5b2d6326d843ba2ad59cd5dd94969931f3 commit refs/tags/aws-v1.0.78
d665febc55b2b3ac1d1f2afd920f4ce547753219 commit refs/tags/aws-v1.0.77
6b446789b97b891194f7ad8f21fee5fcca9448e0 commit refs/tags/aws-v1.0.76
6c467af152e9dca8d579c45959784ef83de4c87c commit refs/tags/aws-v1.0.75
cb5246766736c6ed0ee0530ccd92527b4c307c14 commit refs/tags/aws-v1.0.74
0fade720a730df7a775344921f10c8fcf53e4652 commit refs/tags/aws-v1.0.73
dbf1c0c11e3987467a81ce09a40453d52b174011 commit refs/tags/aws-v1.0.72
c569191173a4dae56ff5e325a86221adcd5856f8 commit refs/tags/aws-v1.0.71
f5ce3a6b66c7c9cd17fb118089b42e041f2987e6 commit refs/tags/aws-v1.0.70
03f4e745de3d2c42fc80e370ca4fc5e9002d4c40 commit refs/tags/aws-v1.0.69
39e0c604ca725ccd9ff4abaffc323e0fb7f4b1c7 commit refs/tags/aws-v1.0.68
dfc2ad8a172ecf06caee7f6c9ec8cfc0a6e8f3d9 commit refs/tags/aws-v1.0.67
b9dd0df715d23f87fd9b9c0aadc4d00af26879a0 commit refs/tags/aws-v1.0.66
120fedf2f571552134e0755d00cdb019e95df7e3 commit refs/tags/aws-v1.0.65
399f0545fafb35a1c08946e774b8ce3ae91dfca7 commit refs/tags/aws-v1.0.64
0185c2acfbaf0c1909580fc4c6bf418f7cc76152 commit refs/tags/aws-v1.0.63
dc97977e09c18da173bbb8d14fa5e3278dbdef6e commit refs/tags/aws-v1.0.62
c9486df4426201cf97aec1378c2a1bde4489e9fa commit refs/tags/aws-v1.0.61
8ef960872e59db5477f8301f4c9003442dc4a075 commit refs/tags/aws-v1.0.60
b9d1dd3b146bbdce8cd1fdd3dbbe9552ecf1df39 commit refs/tags/aws-v1.0.59
16d2e9e93a6d43eae76ed3c7344721efa26bdd4c commit refs/tags/aws-v1.0.58
2334d318b8fa297cf84322e7ec5c29c984e98a24 commit refs/tags/aws-v1.0.57
44e1f0c2dfdd95bc358ff0fb5a6b3948dad0dbbb commit refs/tags/aws-v1.0.55
429f9a4558e83aee515753031b9ec7ca597d92f6 commit refs/tags/aws-v1.0.54
0fda31b194fd681a2fca67c6606cd0f247826e16 commit refs/tags/aws-v1.0.51
d60a174fe50490d69e1d0e9d20fe3b8ed0f56d7c commit refs/tags/aws-v1.0.50
6d74ec6824cbed20c174d07eab718ccba09b254f commit refs/tags/aws-v1.0.49
e933d51bd514fd4df9887e602c1a9d63d766ee65 commit refs/tags/aws-v1.0.48
bc6a0631664163876777fc2c81598cfc3a7c8871 commit refs/tags/aws-v1.0.45
29546002f9fdd3344144610c6eeed1df4ddb1ab1 commit refs/tags/aws-v1.0.44
bbcceb9773430fc179b6e5c180622b3984372477 commit refs/tags/aws-v1.0.42
8f73a44dbf48ebb0ea363a9cf9915e217c477444 commit refs/tags/aws-v1.0.41
08fcae02fd828f7d001e7fc667918503e2c0d9f8 commit refs/tags/aws-v1.0.40
3529c513bdd9254285a4c2baade57fea2c2b3fde commit refs/tags/aws-v1.0.39
7369a8f0afae6a529a64a5f216b864b89cb1db53 commit refs/tags/aws-v1.0.38
0cd2a760bb55b57cbb156d574ed904d40e520439 commit refs/tags/aws-v1.0.37
53e8d12d12c2d1f12bb1d824cf4ebb704ccdcf0b commit refs/tags/aws-v1.0.36
edebaab28e08b83eb5162d9daf6b0505def80b7a commit refs/tags/aws-v1.0.35
d8c5e50df03494b74c72ff607a3f0ef4868d731c commit refs/tags/aws-v1.0.34
957727802b026f09ee937116ea3856101a3cb78b commit refs/tags/aws-v1.0.33
4e05de52cea3118c1cede0231fae3516d79a20f5 commit refs/tags/aws-v1.0.32
0ea47f572ff4fffee68ce60965891f27d6a53e44 commit refs/tags/aws-v1.0.30
7c1c25fd6efad34024892e46d6fbdf181d56f71f commit refs/tags/aws-v1.0.29
b8e7ae5d1f953134dd3c7a941d61cca9939d9a03 commit refs/tags/aws-v1.0.28
6ba053353c716efd7a80afe307e952cdec3c8611 commit refs/tags/aws-v1.0.27
82f9384d88a515690fb25a18964d2687911aabba commit refs/tags/aws-v1.0.26
ee6fe06d36329f7477f42a9e2037b07ee78a342e commit refs/tags/aws-v1.0.25
8b97318e11fae0a072c815e363259d9437534cfe commit refs/tags/aws-v1.0.24
3b64a6d51b6e55898c18c0623324fa74a0030830 commit refs/tags/aws-v1.0.23
7cb399bf0865b36c7c7fb3e932407025fd3ff1ad commit refs/tags/aws-v1.0.22
6b9102228b1a0370792586b9492f5fc1b1dd41f5 commit refs/tags/aws-v1.0.21
62dc1d14f946965d398eb615f996326496e40b71 commit refs/tags/aws-v1.0.20
0e4bba0a642011518f0c9a2588c15e3185f103fd commit refs/tags/aws-v1.0.19
9a40174e147fef0e8df7bec72095f0df1db5b87d commit refs/tags/aws-v1.0.18
e74005526f42fe585006e673367729433197b458 commit refs/tags/aws-v1.0.15
36a248cc97ff79318f30793dff85034fbc2d62bf commit refs/tags/aws-v1.0.14
f1b2e98680fc8f1035b3d7585a0c46da35ab6b6e commit refs/tags/aws-v1.0.13
3581c780176c643cd96011530a2b21820a55f4c1 commit refs/tags/aws-v1.0.12
e7902e43de8e503e75d6ba78b500b7a3cb616e93 commit refs/tags/aws-v1.0.11
3ad02fc1b637d40e5635755da1d576ea178c5491 commit refs/tags/aws-v1.0.10
732b041e0b470f5d8fb9b6f2166b3680fa8f9086 commit refs/tags/aws-v1.0.9
8ed108229bfc0c02cf01916a8e9622e1b3ec74f2 commit refs/tags/aws-v1.0.8
c22ccf4cad2f92af945979bc31a11d4a9ad397f1 commit refs/tags/aws-v1.0.7
f92ef362e742fbe9e14529d511491f0a811fa36a commit refs/tags/aws-v1.0.6
b9ce7a8e70781a6e21ec29c4c4a272e64c6b057e commit refs/tags/aws-v1.0.5
16e8196579e9a7a5685dd09f6d312ff4a5f822cc commit refs/tags/aws-v1.0.4
8a48f2960988ce9be5987e623cfd52023c536956 commit refs/tags/aws-v1.0.3
c3c42bfd3c58d4fc87749335d84a4c2325404d79 commit refs/tags/aws-v1.0.2
a8e5185a93a9eb695b35b73379c2965a43ab3612 commit refs/tags/aws-v1.0.1
820cbf676dcd16a8a692de12d2d387c3c8db8825 commit refs/tags/aws-v1.0.0
e07b94e734d2c70df04b00116f1dd23965b51a20 tag    refs/tags/aws-dns-v0.0.1
eb41cd1772f0f09d3bfab082d8d2130f9390ab2d commit refs/tags/atlas-v0.3.12
fff4ba0344eeeba65b9aa3cca89af933968e45b8 commit refs/tags/atlas-v0.3.11
b79890fd428f0f786e6593ca99d4160aff1fc3d2 commit refs/tags/atlas-v0.3.10
11b9645499beaad2f1abe11ff50a3df2df041581 commit refs/tags/atlas-v0.3.9
4c1b1eae3d0894408c8e8f1df5ba323c72318719 commit refs/tags/atlas-v0.3.8
4bcdcda4521e07440f5fb3553f4738028edf8518 commit refs/tags/atlas-v0.3.7
ec8f5a85514f00663bbe7efd283fd36ab5b43eed commit refs/tags/atlas-v0.3.6
9d0cbcf54426b4ad89433d17da835d1af7654b13 commit refs/tags/atlas-v0.3.5
9ee8760ac7a8e0797732823b9707a526e73f3fe9 commit refs/tags/atlas-v0.3.4
a84e352be98b0b3cbe441e0c6834aced6190dd51 commit refs/tags/atlas-v0.3.3
93da78c4b987b12eec7f2c99a0c8d8ba0a2780ff commit refs/tags/atlas-v0.3.2
840e96918891e1af21e7c66d2d7c94381fa38515 commit refs/tags/atlas-v0.3.1
056308c6a852e2ac965e225409bdd5233bafd629 commit refs/tags/atlas-v0.3.0
4d94935258448bfa9c525d7b435c22e722a8411c commit refs/tags/atlas-v0.2.8
2741e18dfc7736de3f00a17e331f2553669ca279 commit refs/tags/atlas-v0.2.7
31e1d9eca22ea7f98640c098926d2259203bf998 commit refs/tags/atlas-v0.2.6
9d390dafd23d4d336006e801a65cd439fbe2171e commit refs/tags/atlas-v0.2.5
c80c83b010282bfe52c69902c9f560754ba63c3a commit refs/tags/atlas-v0.2.4
f2f039f7e7be11217e284891d1c283482b3fa8b1 commit refs/tags/atlas-v0.2.3
f80e1f81ff11202a05aca076579bc486dabfca5b commit refs/tags/atlas-v0.2.2
a7031dbf34e3f7ce0b4efd5c49df2388076f4929 commit refs/tags/atlas-v0.2.1
18ccd546590fce159e9f22646828f2d2c7352f15 commit refs/tags/atlas-v0.2.0
0ff2d95146c3636861a02ac8332839018d0891e4 commit refs/tags/atlas-v0.1.1
5423d1b3243ece15981baad075c421d964d7b196 commit refs/tags/atlas-v0.1.0
ce41a02b4bc7bc8120a09e11c03a1facfc02d646 commit refs/remotes/origin/main
ce41a02b4bc7bc8120a09e11c03a1facfc02d646 commit refs/heads/main

@MSevey
Copy link

MSevey commented Apr 22, 2022

+1 I'm seeing this issue as well

Any update on this?

@hos-dimabutyrin
Copy link

Start seeing this issue after the upgrade from mathieudutour/[email protected] to mathieudutour/[email protected]

      - uses: mathieudutour/[email protected]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          tag_prefix: eks-
          release_branches: .*

log:

Previous tag was eks-0.0.0, previous version was 0.0.0.
Analysis of 0 commits complete: no release
New version is 0.0.1.
New tag after applying prefix is eks-0.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants