Nightly Docker Cache Build #59
This file contains hidden or 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 Docker Cache Build | |
| on: | |
| schedule: | |
| - cron: '0 2 * * *' # Daily at 2 AM UTC | |
| workflow_dispatch: # Manual trigger | |
| permissions: | |
| contents: read | |
| env: | |
| REGISTRY: registry.gitlab.aleph-alpha.de | |
| REPO_OWNER: research/public-registry | |
| IMAGE_NAME: eval_framework | |
| jobs: | |
| refresh-build-cache: | |
| name: Refresh Docker Build Cache | |
| runs-on: cpu-runner-8c-32gb-01 | |
| container: docker:dind | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - name: Registry Authentication | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: token | |
| password: ${{ secrets.GL_PUBLIC_REGISTRY_READ_WRITE_TOKEN }} | |
| - name: Setup Docker BuildX | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and Push Cache | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| push: false | |
| cache-from: | | |
| type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/${{ env.IMAGE_NAME }}:buildcache | |
| cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/${{ env.IMAGE_NAME }}:buildcache,mode=max |