Skip to content
This repository was archived by the owner on May 2, 2021. It is now read-only.

Commit a7e4d6c

Browse files
Update README.md
1 parent a5ff1b8 commit a7e4d6c

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ jobs:
4949
5050
### Arguments
5151
52-
Required:
52+
Required:
5353
`name` is the name of the image you would like to push
5454
`username` the login username for the registry
5555
`password` the login password for the registry
5656

57-
Optional:
57+
Optional:
5858
`semver`: the tag name e.g. 1.2.3 (if ommited latest will be used as tag)
5959
`dockerfile`: when you would like to explicitly build a Dockerfile
6060
`workdir` if you need to change the work directory
@@ -65,7 +65,21 @@ Optional:
6565

6666
`tag` is the tag, which was pushed
6767

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+
6882
## What's missing?
6983
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
7084
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

Comments
 (0)