You've already forked setup-dotnet
mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-23 22:14:06 +07:00
Compare commits
1 Commits
v4.1.0
...
checkfixes
Author | SHA1 | Date | |
---|---|---|---|
3f6d8d6c10 |
20
.github/workflows/publish-immutable-actions.yml
vendored
20
.github/workflows/publish-immutable-actions.yml
vendored
@ -1,20 +0,0 @@
|
|||||||
name: 'Publish Immutable Action Version'
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checking out
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Publish
|
|
||||||
id: publish
|
|
||||||
uses: actions/publish-immutable-action@0.0.3
|
|
9
dist/cache-save/index.js
vendored
9
dist/cache-save/index.js
vendored
@ -81174,14 +81174,11 @@ function isCacheFeatureAvailable() {
|
|||||||
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
||||||
/**
|
/**
|
||||||
* Returns this action runs on GitHub Enterprise Server or not.
|
* Returns this action runs on GitHub Enterprise Server or not.
|
||||||
|
* (port from https://github.com/actions/toolkit/blob/457303960f03375db6f033e214b9f90d79c3fe5c/packages/cache/src/internal/cacheUtils.ts#L134)
|
||||||
*/
|
*/
|
||||||
function isGhes() {
|
function isGhes() {
|
||||||
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
const url = process.env['GITHUB_SERVER_URL'] || 'https://github.com';
|
||||||
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
|
return new URL(url).hostname.toUpperCase() !== 'GITHUB.COM';
|
||||||
const isGitHubHost = hostname === 'GITHUB.COM';
|
|
||||||
const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM');
|
|
||||||
const isLocalHost = hostname.endsWith('.LOCALHOST');
|
|
||||||
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
9
dist/setup/index.js
vendored
9
dist/setup/index.js
vendored
@ -93633,14 +93633,11 @@ function isCacheFeatureAvailable() {
|
|||||||
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
||||||
/**
|
/**
|
||||||
* Returns this action runs on GitHub Enterprise Server or not.
|
* Returns this action runs on GitHub Enterprise Server or not.
|
||||||
|
* (port from https://github.com/actions/toolkit/blob/457303960f03375db6f033e214b9f90d79c3fe5c/packages/cache/src/internal/cacheUtils.ts#L134)
|
||||||
*/
|
*/
|
||||||
function isGhes() {
|
function isGhes() {
|
||||||
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
const url = process.env['GITHUB_SERVER_URL'] || 'https://github.com';
|
||||||
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
|
return new URL(url).hostname.toUpperCase() !== 'GITHUB.COM';
|
||||||
const isGitHubHost = hostname === 'GITHUB.COM';
|
|
||||||
const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM');
|
|
||||||
const isLocalHost = hostname.endsWith('.LOCALHOST');
|
|
||||||
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
37
externals/install-dotnet.sh
vendored
37
externals/install-dotnet.sh
vendored
@ -423,17 +423,11 @@ get_normalized_architecture_for_specific_sdk_version() {
|
|||||||
# args:
|
# args:
|
||||||
# version or channel - $1
|
# version or channel - $1
|
||||||
is_arm64_supported() {
|
is_arm64_supported() {
|
||||||
# Extract the major version by splitting on the dot
|
#any channel or version that starts with the specified versions
|
||||||
major_version="${1%%.*}"
|
case "$1" in
|
||||||
|
( "1"* | "2"* | "3"* | "4"* | "5"*)
|
||||||
# Check if the major version is a valid number and less than 6
|
echo false
|
||||||
case "$major_version" in
|
return 0
|
||||||
[0-9]*)
|
|
||||||
if [ "$major_version" -lt 6 ]; then
|
|
||||||
echo false
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo true
|
echo true
|
||||||
@ -967,16 +961,15 @@ copy_files_or_dirs_from_list() {
|
|||||||
local root_path="$(remove_trailing_slash "$1")"
|
local root_path="$(remove_trailing_slash "$1")"
|
||||||
local out_path="$(remove_trailing_slash "$2")"
|
local out_path="$(remove_trailing_slash "$2")"
|
||||||
local override="$3"
|
local override="$3"
|
||||||
local override_switch=""
|
local osname="$(get_current_os_name)"
|
||||||
|
local override_switch=$(
|
||||||
if [ "$override" = false ]; then
|
if [ "$override" = false ]; then
|
||||||
override_switch="-n"
|
if [ "$osname" = "linux-musl" ]; then
|
||||||
|
printf -- "-u";
|
||||||
# use -u instead of -n when it's available
|
else
|
||||||
if cp -u --help >/dev/null 2>&1; then
|
printf -- "-n";
|
||||||
override_switch="-u"
|
fi
|
||||||
fi
|
fi)
|
||||||
fi
|
|
||||||
|
|
||||||
cat | uniq | while read -r file_path; do
|
cat | uniq | while read -r file_path; do
|
||||||
local path="$(remove_beginning_slash "${file_path#$root_path}")"
|
local path="$(remove_beginning_slash "${file_path#$root_path}")"
|
||||||
@ -1742,7 +1735,7 @@ do
|
|||||||
zip_path="$1"
|
zip_path="$1"
|
||||||
;;
|
;;
|
||||||
-?|--?|-h|--help|-[Hh]elp)
|
-?|--?|-h|--help|-[Hh]elp)
|
||||||
script_name="dotnet-install.sh"
|
script_name="$(basename "$0")"
|
||||||
echo ".NET Tools Installer"
|
echo ".NET Tools Installer"
|
||||||
echo "Usage:"
|
echo "Usage:"
|
||||||
echo " # Install a .NET SDK of a given Quality from a given Channel"
|
echo " # Install a .NET SDK of a given Quality from a given Channel"
|
||||||
|
@ -90,16 +90,9 @@ export function isCacheFeatureAvailable(): boolean {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns this action runs on GitHub Enterprise Server or not.
|
* Returns this action runs on GitHub Enterprise Server or not.
|
||||||
|
* (port from https://github.com/actions/toolkit/blob/457303960f03375db6f033e214b9f90d79c3fe5c/packages/cache/src/internal/cacheUtils.ts#L134)
|
||||||
*/
|
*/
|
||||||
function isGhes(): boolean {
|
function isGhes(): boolean {
|
||||||
const ghUrl = new URL(
|
const url = process.env['GITHUB_SERVER_URL'] || 'https://github.com';
|
||||||
process.env['GITHUB_SERVER_URL'] || 'https://github.com'
|
return new URL(url).hostname.toUpperCase() !== 'GITHUB.COM';
|
||||||
);
|
|
||||||
|
|
||||||
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
|
|
||||||
const isGitHubHost = hostname === 'GITHUB.COM';
|
|
||||||
const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM');
|
|
||||||
const isLocalHost = hostname.endsWith('.LOCALHOST');
|
|
||||||
|
|
||||||
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user