Nightly Base Image Build #1
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: Nightly Base Image Build | |
on: | |
schedule: | |
# Runs at 2:00 AM UTC every day | |
- cron: '0 2 * * *' | |
workflow_dispatch: # Allow manual triggering | |
env: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
IMAGE_NAME: superglueai/superglue-base | |
jobs: | |
build-base-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ env.DOCKERHUB_USERNAME }} | |
password: ${{ env.DOCKERHUB_TOKEN }} | |
- name: Build and push multi-architecture base image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./docker/Dockerfile.base | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
${{ env.IMAGE_NAME }}:latest | |
${{ env.IMAGE_NAME }}:${{ github.sha }} | |
cache-from: type=gha,scope=base-multiarch | |
cache-to: type=gha,mode=max,scope=base-multiarch |