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 ]
|
branches: [ master ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * 3'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
@ -30,18 +32,18 @@ jobs:
|
|||||||
echo "DOCKER_USERNAME=remote" >> $GITHUB_ENV
|
echo "DOCKER_USERNAME=remote" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build the Docker image
|
- 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
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@v1
|
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:
|
with:
|
||||||
registry: ${{ env.DH_REGISTRY }}
|
registry: ${{ env.DH_REGISTRY }}
|
||||||
username: ${{ env.DOCKER_USERNAME }}
|
username: ${{ env.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Push to Docker Hub
|
- 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"
|
run: docker push "$DOCKER_USERNAME/$REPOSITORY:latest"
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
- name: Log in to the Container registry
|
||||||
@ -59,7 +61,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Push to GitHub
|
- name: Push to GitHub
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user