Skip to content

Instantly share code, notes, and snippets.

@rtyley
Created May 22, 2024 09:19
Show Gist options
  • Save rtyley/82b770c98b435adb75b6b52cf2d92494 to your computer and use it in GitHub Desktop.
Save rtyley/82b770c98b435adb75b6b52cf2d92494 to your computer and use it in GitHub Desktop.
Update Guardian projects using gha-scala-library-release-workflow, add .tool-versions
#!/usr/bin/env bash
xargs -I GU_REPO gh api --method PUT /repos/guardian/GU_REPO/contents/.tool-versions \
--field message="Add Java version - see https://github.com/guardian/gha-scala-library-release-workflow/pull/36" \
--field content="$( echo "java corretto-21.0.3.9.1" | base64)" < "$1"
echo "Repos still needing the file:"
xargs -I GU_REPO sh -c 'gh api --silent --method GET /repos/guardian/GU_REPO/contents/.tool-versions || echo GU_REPO' < "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment