Add inputs for a custom download feed (azure-feed, uncached-feed, feed-credential)

オープン
#801 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
github-actions, typescript
領域
devops, tooling

調査の方向性

Start with src/installer.ts and trace how DotnetInstallScript builds arguments for the bundled scripts externals/install-dotnet.sh and externals/install-dotnet.ps1; check the action input definitions and related tests to see how inputs are wired. Done means all three feed values reach the matching OS option and the credential is masked with core.setSecret(). The releases-index URL is described as optional.

索引モデルが issue の本文から書いたものです。

説明

Description:
Add inputs to set a custom download feed (mirror or proxy) for the .NET install script.

The bundled install scripts (externals/install-dotnet.sh and externals/install-dotnet.ps1) already support these options:

Bash option PowerShell option Function
--azure-feed -AzureFeed Sets the base URL for the download of the SDK and runtime archives
--uncached-feed -UncachedFeed Sets the base URL for uncached downloads
--feed-credential -FeedCredential Adds a query string (for example a SAS token) to each feed URL

At this time, the action does not send these options to the script. DotnetInstallScript in src/installer.ts only adds -ProxyAddress and -ProxyBypassList on Windows.

Proposed usage:

- uses: actions/setup-dotnet@v6
  with:
    dotnet-version: '9.0.x'
    dotnet-feed: 'https://artifactory.example.com/artifactory/dotnet'
    dotnet-uncached-feed: 'https://artifactory.example.com/artifactory/dotnet'
    dotnet-feed-credential: ${{ secrets.DOTNET_FEED_CREDENTIAL }}

Expected behavior:

  1. The action sends each value to the install script with the correct option for the OS (--azure-feed or -AzureFeed, and the other options).
  2. The action masks the credential with core.setSecret(), so that it does not show in the logs.
  3. Optional: an input to set the URL of releases-index.json. The action downloads this file from https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json to find the latest version for A.x and A.B.x. If the runner cannot get access to this URL, floating versions fail even with a custom feed (see #762).

Justification:

  • Many companies use self-hosted runners in a closed network. These runners can only download through an internal mirror or proxy repository (Artifactory, Nexus, Azure Blob Storage). They cannot get access to builds.dotnet.microsoft.com.
  • The https_proxy variable is not always a solution. Some networks allow only a repository mirror, not an HTTP proxy.
  • In some regions, the download from the default CDN is slow (see #450). A mirror near the runner makes the download faster.
  • At this time, the only workaround is to not use this action and run dotnet-install manually. Then the workflow loses the other features of the action (cache, global-json-file, NuGet authentication, problem matchers).

Related: #450, #762

Are you willing to submit a PR?

主要言語
TypeScript
スター
1.2k
フォーク
575
平均マージ
7日 23時間
マージ済み PR(30日)
3

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

actions/setup-dotnet のほかの issue

actions/setup-dotnet の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。