- apko configs for runtime (ICU), runtime-invariant (no ICU), and SDK variants - Build workflow with dynamic matrix from .NET release metadata (EOL-aware) - Daily update-check workflow to detect new .NET versions - Docker Scout PR analysis workflow - LTS/STS floating tags, multi-arch (amd64 + arm64) - Makefile for local builds and version discovery Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
75 lines
2.6 KiB
YAML
75 lines
2.6 KiB
YAML
name: Daily .NET Version Check
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 8 * * *"
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
DOCKER_IMAGE: docker.io/svrnty/dotnet
|
|
RELEASES_INDEX_URL: https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json
|
|
|
|
jobs:
|
|
check-versions:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_SVRNTY_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_SVRNTY_ACCESS_TOKEN }}
|
|
|
|
- name: Check for new .NET versions
|
|
id: check
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
# Fetch release metadata
|
|
RELEASES=$(curl -fsSL "$RELEASES_INDEX_URL")
|
|
|
|
# Filter active/go-live versions (excludes EOL automatically)
|
|
SUPPORTED=$(echo "$RELEASES" | jq -c '[.["releases-index"][] | select(.["support-phase"] == "active" or .["support-phase"] == "go-live")]')
|
|
|
|
NEEDS_BUILD=false
|
|
|
|
echo "$SUPPORTED" | jq -r '.[] | "\(.["channel-version"]) \(.["latest-runtime"]) \(.["latest-sdk"]) \(.["release-type"])"' | \
|
|
while read -r CHANNEL RUNTIME SDK TYPE; do
|
|
MAJOR=$(echo "$CHANNEL" | cut -d. -f1)
|
|
echo "Checking .NET $MAJOR: runtime=$RUNTIME sdk=$SDK type=$TYPE"
|
|
|
|
# Check if runtime image for this exact version exists
|
|
if docker manifest inspect "$DOCKER_IMAGE:runtime-$RUNTIME" > /dev/null 2>&1; then
|
|
echo " Image runtime-$RUNTIME already exists, skipping"
|
|
else
|
|
echo " New version detected: runtime-$RUNTIME"
|
|
NEEDS_BUILD=true
|
|
fi
|
|
done
|
|
|
|
# Re-check outside the pipe (subshell issue)
|
|
NEEDS_BUILD=false
|
|
while read -r CHANNEL RUNTIME SDK TYPE; do
|
|
MAJOR=$(echo "$CHANNEL" | cut -d. -f1)
|
|
if ! docker manifest inspect "$DOCKER_IMAGE:runtime-$RUNTIME" > /dev/null 2>&1; then
|
|
NEEDS_BUILD=true
|
|
break
|
|
fi
|
|
done < <(echo "$SUPPORTED" | jq -r '.[] | "\(.["channel-version"]) \(.["latest-runtime"]) \(.["latest-sdk"]) \(.["release-type"])"')
|
|
|
|
echo "needs_build=$NEEDS_BUILD" >> $GITHUB_OUTPUT
|
|
|
|
- name: Trigger build workflow
|
|
if: steps.check.outputs.needs_build == 'true'
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
await github.rest.actions.createWorkflowDispatch({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
workflow_id: 'build.yaml',
|
|
ref: context.ref
|
|
})
|