This repository has been archived by the owner on Apr 17, 2024. It is now read-only.
Docker Image Rebuild on a CRON Schedule #320
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |