Skip to content

Scheduled rebuild

Scheduled rebuild #146

Workflow file for this run

# 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: javaplayground
GH_CONTAINER_REGISTRY_USERNAME: mccue-software-solutions
AWS_ACCESS_KEY_ID: AKIAWESVHZ3JQAY5NM5K
jobs:
build_compiler_containers:
name: Build ${{ matrix.runtime }} container
runs-on: ubuntu-latest
strategy:
matrix:
include:
- runtime: latest
TARGZ_URL: https://download.java.net/java/GA/jdk21.0.1/415e3f918a1f4062a0074a2794853d0d/12/GPL/openjdk-21.0.1_linux-x64_bin.tar.gz
TARGZ_SHA: 7e80146b2c3f719bf7f56992eb268ad466f8854d5d6ae11805784608e458343f
TARGZ_FOLDER: jdk-21.0.1
- runtime: valhalla
TARGZ_URL: https://download.java.net/java/early_access/valhalla/20/openjdk-20-valhalla+20-75_linux-x64_bin.tar.gz
TARGZ_SHA: cd0a008aee632cbff2f9c529aba17f4ad7f733cd974d36d2293169bc35e73ae7
TARGZ_FOLDER: jdk-20
- runtime: early_access
TARGZ_URL: https://download.java.net/java/early_access/jdk22/20/GPL/openjdk-22-ea+20_linux-x64_bin.tar.gz
TARGZ_SHA: 5f1627efa81951307900954bbf7b2e49d8c5303615cf116959c273e9707b0496
TARGZ_FOLDER: jdk-22
env:
IMAGE_NAME: ghcr.io/mccue-software-solutions/java-playground-ci-${{ matrix.runtime }}
DOCKER_HUB_IMAGE_NAME: javaplayground/${{ matrix.runtime }}
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
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: "${{ github.actor }}"
password: "${{ secrets.GITHUB_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@v4
with:
context: compiler/base/
file: compiler/base/Dockerfile
build-args: |-
TARGZ_URL=${{ matrix.TARGZ_URL }}
TARGZ_SHA=${{ matrix.TARGZ_SHA }}
TARGZ_FOLDER=${{ matrix.TARGZ_FOLDER }}
pull: true
push: true
tags: "${{ env.IMAGE_NAME }}:${{ github.run_id }}"
- 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 }}