Skip to content

Weekly Docker Environment Builder #73

Weekly Docker Environment Builder

Weekly Docker Environment Builder #73

name: Weekly Docker Environment Builder
on:
schedule:
- cron: '0 0 * * 0' # Run at midnight every Sunday
push:
paths:
- '.github/docker/testing-environment.Dockerfile'
- '.github/workflows/docker_env_builder.yml'
workflow_dispatch: # Allow manual trigger
env:
DOCKER_BUILDKIT: 1
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/giotto-suite/ci-giottosuite/ci-env
tags: |
type=schedule,pattern={{date 'YYYYMMDD'}}
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./.github/docker/testing-environment.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/giotto-suite/ci-giottosuite/ci-env:latest
cache-to: type=inline