GithubHelp home page GithubHelp logo

autotag-action's People

Contributors

actions-user avatar dependabot-preview[bot] avatar dependabot[bot] avatar github-actions[bot] avatar mrxx99 avatar phish108 avatar roborourke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

autotag-action's Issues

Make prerelease tagging optional?

Rather than having to define a release branch in order to avoid the pre-release naming convention, it would be useful to have a flag to use prerelease format.

allow for date-time based tags

Usecase For docker containers semver is not always the best way of tagging. Instead date tags are used to indicate the most recent release (by date). In order to have date versions sortable, the date should be in reverse order (yyyy-mm-dd).

add a style parameter.

style: 
    description: "choose versioning style"
    required: false
    default: "semver"

Potential values:

  • semver - the old behaviour
  • datetime - the flat date-time timestamp as a tag (yyyymmddhhmm)
  • date - flat date without time as a tag (yyyymmdd)
  • dotdate - the date with dots (yyyy.mm.dd)
  • dotdatetime - the date time with dots (yyyy.mm.dd.hh.mm)
  • isodate - the date in ISO format with dashes as separators (yyyy-mm-dd)
  • isodatetime - ISO date-time with (yyyy-mm-ddThh-mm)

isodatetime uses a dash for the hour-minute separator instead of the colon. This is because the colon is forbidden with container labels.

Fail if no previous tag

When using it in a new project without already a first tag version, it apparently failed.

run for m21-cerutti / UnityCI_Project
load the history of activity-branch main from context ref refs/heads/main
active branch name is main
maching refs: d5ae4c7112a14242bababc49b3f3173345aef401
the previous tag of the repository undefined
the previous main tag of the repository undefined
The repo tags: undefined
default to prerelease version 0.0.1-main.0
commits in branch
Error: Cannot read property 'commit' of undefined```

Don't fail if there is nothing to do.

If no tag is issued the action must not fail due to changes in how GH Actions execute following steps. It should be left to the action script how this is handled

Instead, the action should not return a new tag if no changes since the previous tag have been detected.

This can happen when a PR could not get merged and the target branch is not altered.

Fails on a second tag after removing "with-v" option

Hello!

I started to use Auto.Tag with "with-v" option and after some time a decided to remove "v" from my tags.
On the first commit everything works fine - version 2.2.6 was created after v2.2.5.
But on the second commit (when I want 2.2.7) Auto.Tag found v2.2.5 again as a previous tag and failed to create 2.2.6 because it already existed.

Run phish108/[email protected]
run for FastSense / linkman_robot
load the history of activity-branch develop from context ref refs/heads/develop
active branch name is develop
maching refs: 714191cf1add2aa369c2eaebf2fc117[8](https://github.com/FastSense/linkman_robot/actions/runs/3900020200/jobs/6660228826#step:2:9)643b87c4
the previous tag of the repository {
  "name": "v2.2.5",
  "zipball_url": "https://api.github.com/repos/FastSense/linkman_robot/zipball/refs/tags/v2.2.5",
  "tarball_url": "https://api.github.com/repos/FastSense/linkman_robot/tarball/refs/tags/v2.2.5",
  "commit": {
    "sha": "702802680c2e7de6a20e207a24ae05d[9](https://github.com/FastSense/linkman_robot/actions/runs/3900020200/jobs/6660228826#step:2:10)0d5bd60d",
    "url": "https://api.github.com/repos/FastSense/linkman_robot/commits/702802680c2e7de6a20e207a24ae05d90d5bd60d"
  },
  "node_id": "REF_kwDOGjw8e7ByZWZzL3RhZ3MvdjIuMi41"
}
the previous main tag of the repository {
  "name": "v2.2.5",
  "zipball_url": "https://api.github.com/repos/FastSense/linkman_robot/zipball/refs/tags/v2.2.5",
  "tarball_url": "https://api.github.com/repos/FastSense/linkman_robot/tarball/refs/tags/v2.2.5",
  "commit": {
    "sha": "702802680c2e7de6a20e207a24ae05d90d5bd60d",
    "url": "https://api.github.com/repos/FastSense/linkman_robot/commits/702802680c2e7de6a20e207a24ae05d90d5bd60d"
  },
  "node_id": "REF_kwDOGjw8e7ByZWZzL3RhZ3MvdjIuMi41"
}
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-[10](https://github.com/FastSense/linkman_robot/actions/runs/3900020200/jobs/6660228826#step:2:11)-[11](https://github.com/FastSense/linkman_robot/actions/runs/3900020200/jobs/6660228826#step:2:12)-github-actions-deprecating-save-state-and-set-output-commands/
The repo tags: {
  "name": "v2.2.5",
  "zipball_url": "https://api.github.com/repos/FastSense/linkman_robot/zipball/refs/tags/v2.2.5",
  "tarball_url": "https://api.github.com/repos/FastSense/linkman_robot/tarball/refs/tags/v2.2.5",
  "commit": {
    "sha": "702802680c2e7de6a20e207a24ae05d90d5bd60d",
    "url": "https://api.github.com/repos/FastSense/linkman_robot/commits/702802680c2e7de6a20e207a24ae05d90d5bd60d"
  },
  "node_id": "REF_kwDOGjw8e7ByZWZzL3RhZ3MvdjIuMi41"
}
default to prerelease version 2.2.6-develop.0
commits in branch
develop is a release branch
bump tag 2.2.6
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/[20](https://github.com/FastSense/linkman_robot/actions/runs/3900020200/jobs/6660228826#step:2:21)[22](https://github.com/FastSense/linkman_robot/actions/runs/3900020200/jobs/6660228826#step:2:23)-10-11-github-actions-deprecating-save-state-and-set-output-commands/
really add tag 2.2.6
Error: Reference already exists

`set-output` is being deprecated

As per this 2022 blogpost, the set-output command is being deprecated. This results in job warnings:

Warning: The set-output command is deprecated and will be disabled soon. Please upgrade to using Environment Files.

This requires a bit of rework, since it conflicts with the generic Command

verify that custom tags do not exist

Currently custom tags (via tag-input) are just applied. This creates conflicts, if the tag already exists.

Todo: ensure that a tag does not exist before adding it

Manually specify a tag?

Is it possible to manually specify a tag using something like:

      - name: Auto Tag
        uses: phish108/[email protected]
        env:
          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
        with:
          version: "${{ steps.id.outputs.version }}"

switch to GH graphQL API

In order to keep up with future API changes, the action should move to the newer GH graphQL API.

tagging after merging fails - documentation needed

If the autotagger is called after a merge action of a PR and the branch has been removed, then the tagger will fail.

This frequently happens for dependabot triggered PRs.

This is not a bug in the autotagger itself, but a lack of documentation. If the action cannot ensure that the context branch still exists at the time of the action is running, then we MUST enforce a branch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.