You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 2, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,12 +49,12 @@ jobs:
49
49
50
50
### Arguments
51
51
52
-
Required:
52
+
Required:
53
53
`name` is the name of the image you would like to push
54
54
`username`the login username for the registry
55
55
`password`the login password for the registry
56
56
57
-
Optional:
57
+
Optional:
58
58
`semver`: the tag name e.g. 1.2.3 (if ommited latest will be used as tag)
59
59
`dockerfile`: when you would like to explicitly build a Dockerfile
60
60
`workdir`if you need to change the work directory
@@ -65,7 +65,21 @@ Optional:
65
65
66
66
`tag`is the tag, which was pushed
67
67
68
+
## Automatic versions via VERSION file
69
+
Action also supports a way of automatic version using the VERSION file.
70
+
71
+
VERSION file is a simple text file that contains the version number for example:
72
+
```1.4.12```
73
+
74
+
The action will try to extract the file from built image, so if you want to use it you will need to add it as a part of your repository and your Dockerfile.
75
+
Let's imagine that you have a _VERSION_ file in the same folder as the _Dockerfile_. In the _Dockerfile_ you'd need to add a line:
76
+
```ADD VERSION .```
77
+
so the _VERSION_ file gets copied.
78
+
79
+
If you have done all this the action will extract the _VERSION_ file and read the version value that will be used as a tag for your image.
80
+
If you think that all this is bollocks your build will still work without adding the _VERSION_ file.
81
+
68
82
## What's missing?
69
83
I have no support for properly tagging images built from branches or PRs one would expect to be able to just specify 1.4.5 and when you are pushing
70
84
an image from a branch to get a tag: 1.4.5-mybranch same goes for PR
71
-
Current workaround for that is that you specify the suffix yourself.
85
+
Current workaround for that is that you specify the suffix yourself.
0 commit comments