Compute short hash from GITHUB_SHA rather than using actual Git opera… #12
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
on: | |
push: | |
branches: [ "*" ] | |
tags: [ "*" ] | |
paths-ignore: [ "README.md" ] | |
workflow_dispatch: { } | |
jobs: | |
build_variables: | |
name: "Set build variables" | |
runs-on: "ubuntu-latest" | |
outputs: | |
build_image: "${{ steps.build_variables.outputs.build_image }}" | |
build_version: "${{ steps.build_variables.outputs.build_version }}" | |
steps: | |
- id: "build_variables" | |
run: | | |
set -euo pipefail | |
BUILD_IMAGE="$(echo "ghcr.io/$GITHUB_REPOSITORY" | tr '[:upper:]' '[:lower:]')" | |
BUILD_VERSION="git-$(date +'%Y%m%d%H%M')-$(echo "$GITHUB_SHA" | head -c 7)" | |
echo "build_image=$BUILD_IMAGE" | tee -a "$GITHUB_OUTPUT" | |
echo "build_version=$BUILD_VERSION" | tee -a "$GITHUB_OUTPUT" | |
hotspot: | |
name: "HotSpot JIT" | |
needs: "build_variables" | |
uses: "./.github/workflows/hotspot.yml" | |
secrets: "inherit" | |
with: | |
JDK_VERSION: "23" | |
BUILD_IMAGE: "${{ needs.build_variables.build_image }}" | |
BUILD_REVISION: "${{ needs.build_variables.build_version }}" | |
graal: | |
name: "GraalVM AOT" | |
needs: [ "build_variables", "hotspot" ] | |
uses: "./.github/workflows/graal.yml" | |
secrets: "inherit" | |
with: | |
JDK_VERSION: "23" | |
BUILD_IMAGE: "${{ needs.build_variables.build_image }}" | |
BUILD_REVISION: "${{ needs.build_variables.build_version }}" |