Skip to content

Scheduled build and push of all images #18

Scheduled build and push of all images

Scheduled build and push of all images #18

# This workflow will run every first of the month, to make sure we update the underlying images and libraries
name: Scheduled build and push of all images
on:
workflow_dispatch:
schedule:
- cron: "0 0 1 * *"
push:
branches:
- develop
paths:
- 'backend/requirements.txt'
jobs:
rebuild-scheduled:
name: Rebuild images
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build frontend image
uses: docker/build-push-action@v6
with:
context: frontend/.
file: frontend/Dockerfile.base
push: true
tags: ghcr.io/centrefordigitalhumanities/ianalyzer-frontend:latest
platforms: linux/amd64,linux/arm64
- name: Build backend image
uses: docker/build-push-action@v6
with:
context: backend/.
file: backend/Dockerfile.base
push: true
tags: ghcr.io/centrefordigitalhumanities/ianalyzer-backend:latest
platforms: linux/amd64,linux/arm64
rebuild-with-dependencies:
name: Build backend image with dependencies
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build backend image
uses: docker/build-push-action@v6
with:
context: backend/.
file: backend/Dockerfile
push: true
tags: ghcr.io/centrefordigitalhumanities/ianalyzer-backend-dependencies:latest
platforms: linux/amd64,linux/arm64