Add schedule to keep base up-to-date
This commit is contained in:
parent
2d9bfdd962
commit
f1008c0129
10
.github/workflows/docker-image.yml
vendored
10
.github/workflows/docker-image.yml
vendored
@ -5,6 +5,8 @@ on:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '0 5 * * 3'
|
||||
|
||||
jobs:
|
||||
|
||||
@ -30,18 +32,18 @@ jobs:
|
||||
echo "DOCKER_USERNAME=remote" >> $GITHUB_ENV
|
||||
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag "$DOCKER_USERNAME/$REPOSITORY:latest"
|
||||
run: docker build --pull . --file Dockerfile --tag "$DOCKER_USERNAME/$REPOSITORY:latest"
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||
if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'schedule')
|
||||
with:
|
||||
registry: ${{ env.DH_REGISTRY }}
|
||||
username: ${{ env.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Push to Docker Hub
|
||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||
if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'schedule')
|
||||
run: docker push "$DOCKER_USERNAME/$REPOSITORY:latest"
|
||||
|
||||
- name: Log in to the Container registry
|
||||
@ -59,7 +61,7 @@ jobs:
|
||||
|
||||
- name: Push to GitHub
|
||||
uses: docker/build-push-action@v2
|
||||
if: github.event_name == 'push'
|
||||
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
|
Loading…
x
Reference in New Issue
Block a user