Skip to content

Scheduled rebuild

Scheduled rebuild #5

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: bowbahdoe
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/jdk22.0.2/c9ecb94cd31b495da20a27d4581645e8/9/GPL/openjdk-22.0.2_linux-x64_bin.tar.gz
TARGZ_SHA: 41536f115668308ecf4eba92aaf6acaeb0936225828b741efd83b6173ba82963
TARGZ_FOLDER: jdk-22.0.2
- runtime: valhalla
TARGZ_URL: https://download.java.net/java/early_access/valhalla/1/openjdk-23-valhalla+1-90_linux-x64_bin.tar.gz
TARGZ_SHA: 5235afaf5ecc86f2237458cf40f8ed965939372f606edbd0fc46e1ee2e69f5f5
TARGZ_FOLDER: jdk-23
- runtime: early_access
TARGZ_URL: https://download.java.net/java/early_access/jdk23/34/GPL/openjdk-23-ea+34_linux-x64_bin.tar.gz
TARGZ_SHA: 9d3fa4fbb8247f3a47788c52c09ac5c265e023cfda821610ade2a43104bdaace
TARGZ_FOLDER: jdk-23
env:
IMAGE_NAME: ghcr.io/bowbahdoe/run-java-code-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 }}