Skip to content

Merge branch 'release/5.21.0' #25

Merge branch 'release/5.21.0'

Merge branch 'release/5.21.0' #25

# 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:
tags:
- '*'
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
build-indexing-image:
name: Build backend image for indexing
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event_name == 'tag'
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
target: indexing
push: true
tags: ghcr.io/centrefordigitalhumanities/ianalyzer-indexing:latest
platforms: linux/amd64,linux/arm64
delete-untagged-base-images:
runs-on: ubuntu-latest
needs: rebuild-scheduled
steps:
- name: Package/Container Cleanup action in ghcr.io
uses: dataaxiom/ghcr-cleanup-action@v1
with:
delete-untagged: true
exclude-tags: latest
delete-untagged-indexing-images:
runs-on: ubuntu-latest
needs: build-indexing-image
steps:
- name: Package/Container Cleanup action in ghcr.io
uses: dataaxiom/ghcr-cleanup-action@v1
with:
delete-untagged: true
exclude-tags: latest