Add buildoptions

This commit is contained in:
Lars Gohr
2019-12-19 21:12:59 +01:00
parent f1df09237f
commit a72734e157
3 changed files with 46 additions and 6 deletions

View File

@@ -123,6 +123,22 @@ All `buildargs` will be masked, so that they don't appear in the logs.
buildargs: MY_FIRST,MY_SECOND
```
### buildoptions
Use `buildoptions` when you want to configure [options](https://docs.docker.com/engine/reference/commandline/build/#options) for building.
```yaml
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
env:
MY_FIRST: variableContent
MY_SECOND: variableContent
with:
name: myDocker/repository
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
buildoptions: "--compress --force-rm"
```
### cache
Use `cache` when you have big images, that you would only like to build partially (changed layers).
> CAUTION: Docker builds will cache non-repoducable commands, such as installing packages. If you use this option, your packages will never update. To avoid this, run this action on a schedule with caching **disabled** to rebuild the cache periodically.