Simplify caching setup

This commit is contained in:
Lars Gohr
2019-11-14 20:20:22 +01:00
parent e8f33163ce
commit 02076157a9

View File

@@ -111,7 +111,7 @@ Use `cache` when you have big images, that you would only like to build partiall
> 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.
```yaml
name: Update Dependencies
name: Publish to Registry
on:
schedule:
- cron: '0 2 * * 0' # Weekly on Sundays at 02:00
@@ -126,22 +126,7 @@ jobs:
name: myDocker/repository
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
---
name: Publish Docker
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: myDocker/repository
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
cache: true
cache: ${{ github.event_name != 'schedule' }}
```
### tag_names