Scheduled rebuild #1414
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
# This file was generated by ci/generate and should not be modified by hand | |
--- | |
name: Scheduled rebuild | |
'on': | |
workflow_dispatch: | |
schedule: | |
- cron: 7 2 * * * | |
env: | |
DOCKER_HUB_USERNAME: shepmaster | |
GH_CONTAINER_REGISTRY_USERNAME: shepmaster | |
AWS_ACCESS_KEY_ID: AKIAWESVHZ3JQAY5NM5K | |
jobs: | |
build_compiler_containers: | |
name: Build ${{ matrix.channel }} compiler container | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
channel: | |
- stable | |
- beta | |
- nightly | |
env: | |
IMAGE_NAME: ghcr.io/integer32llc/rust-playground-ci-rust-${{ matrix.channel }} | |
DOCKER_HUB_IMAGE_NAME: shepmaster/rust-${{ matrix.channel }} | |
continue-on-error: true | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
driver-opts: image=moby/buildkit:v0.11.6 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: "${{ env.GH_CONTAINER_REGISTRY_USERNAME }}" | |
password: "${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }}" | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: "${{ env.DOCKER_HUB_USERNAME }}" | |
password: "${{ secrets.DOCKER_HUB_TOKEN }}" | |
- name: Build and push container | |
uses: docker/build-push-action@v5 | |
with: | |
context: compiler/base/ | |
file: compiler/base/Dockerfile | |
build-args: channel=${{ matrix.channel }} | |
push: true | |
tags: "${{ env.IMAGE_NAME }}:${{ github.run_id }}" | |
cache-from: type=gha,scope=${{ matrix.channel }} | |
cache-to: type=gha,scope=${{ matrix.channel }},mode=max | |
- name: Pull container | |
run: docker pull ${{ env.IMAGE_NAME }}:${{ github.run_id }} | |
- name: Rename container | |
run: |- | |
docker tag ${{ env.IMAGE_NAME }}:${{ github.run_id }} ${{ env.IMAGE_NAME }} | |
docker tag ${{ env.IMAGE_NAME }}:${{ github.run_id }} ${{ env.DOCKER_HUB_IMAGE_NAME }} | |
- name: Push container | |
run: |- | |
docker push ${{ env.IMAGE_NAME }} | |
docker push ${{ env.DOCKER_HUB_IMAGE_NAME }} |