Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Docker Image Rebuild on a CRON Schedule #305

Docker Image Rebuild on a CRON Schedule

Docker Image Rebuild on a CRON Schedule #305

name: Docker Image Rebuild on a CRON Schedule
on:
schedule:
# Runs "At 11:45 every day" (see https://crontab.guru)
- cron: '45 11 * * *'
# Allow running rebuilds manually
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup env file
uses: c-py/action-dotenv-to-setenv@v5
with:
env-file: .env
- name: docker login
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- name: Build and Push the Docker image to DockerHub
run: |
src/build-push-container-imgs.sh