A Github Actions script that checks if a local copy of the dotnet-install scripts is up to date or not, according to the official dotnet CDN. This script uses the ETag, or Entity Tag, value of the script to determine up-to-date-d-ness.
Required The name of the script file to check. Should be either 'dotnet-install.sh' or 'dotnet-install.ps1'. Defaults to 'dotnet-install.sh'
Required The ETag value of the script to check against. This is a string value that can be found in the 'ETag' HTTP response headers of the script URL. There is no default, so you will need to store and know this value.
You can get the latest one by running the following command in your terminal:
curl -s --head https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh | grep ETag | cut -d' ' -f2
(curl -s --head https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.ps1 | select-string ETag) -split " " | select-object -index 1
The current ETag of the script that was requested. This is the value that you can use to update your local copy of the script.
uses: baronfel/[email protected]
with:
script-file: dotnet-install.sh
etag: 0x8DD2F3D8D65F264