phish108 / autotag-action Goto Github PK
View Code? Open in Web Editor NEWA lightning fast autotagger for semver tagging in github actions
License: MIT License
A lightning fast autotagger for semver tagging in github actions
License: MIT License
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.
As per this 2022 blog post, node12
is going to be deprecated.
This currently gives a warning:
Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: phish108/[email protected].
According to the post above, this will start breaking things sometime this summer.
Looks like it should be as simple as updating action.yml
Line 7 in 6dcf3d7
Documentation and code refer to input parameter 'tag' but it is not declared in action.yml
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 behaviourdatetime
- 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.
If you have a branch name like env/dev
, the branch is identified as just dev
, so if you want a release-branch
pattern like env/.*
, it will not work.
It finds the existing tag from the previous run, like v1.0.0
, and then adds an additional v
, ending up with vv1.0.0
.
Repro: use with-v
and then build off the same commit twice.
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```
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.
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
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
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
If multiple prereleases exist, they may confuse each other.
Add test logic that ensures that only the relevant tags are used for the latest 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 }}"
In order to keep up with future API changes, the action should move to the newer GH graphQL API.
It's documented and in the JS code but I'm seeing warnings about that particular input not being defined when trying to use it.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.