mirror of
https://github.com/actions/versions-package-tools.git
synced 2025-12-11 12:06:44 +00:00
Migrate tools CI to GA
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Generate versions manifest based on repository releases
|
||||
|
||||
.DESCRIPTION
|
||||
Versions manifest is needed to find the latest assets for particular version of tool
|
||||
.PARAMETER GitHubRepositoryOwner
|
||||
Required parameter. The organization which tool repository belongs
|
||||
.PARAMETER GitHubRepositoryName
|
||||
Required parameter. The name of tool repository
|
||||
.PARAMETER RepositoryFullName
|
||||
Required parameter. The owner and repository name. For example, 'actions/versions-package-tools'
|
||||
.PARAMETER GitHubAccessToken
|
||||
Required parameter. PAT Token to overcome GitHub API Rate limit
|
||||
.PARAMETER OutputFile
|
||||
@@ -17,8 +14,7 @@ Path to the json file with parsing configuration
|
||||
#>
|
||||
|
||||
param (
|
||||
[Parameter(Mandatory)] [string] $GitHubRepositoryOwner,
|
||||
[Parameter(Mandatory)] [string] $GitHubRepositoryName,
|
||||
[Parameter(Mandatory)] [string] $RepositoryFullName,
|
||||
[Parameter(Mandatory)] [string] $GitHubAccessToken,
|
||||
[Parameter(Mandatory)] [string] $OutputFile,
|
||||
[Parameter(Mandatory)] [string] $ConfigurationFile
|
||||
@@ -29,7 +25,7 @@ Import-Module (Join-Path $PSScriptRoot "manifest-utils.psm1") -Force
|
||||
|
||||
$configuration = Read-ConfigurationFile -Filepath $ConfigurationFile
|
||||
|
||||
$gitHubApi = Get-GitHubApi -AccountName $GitHubRepositoryOwner -ProjectName $GitHubRepositoryName -AccessToken $GitHubAccessToken
|
||||
$gitHubApi = Get-GitHubApi -RepositoryFullName $RepositoryFullName -AccessToken $GitHubAccessToken
|
||||
$releases = $gitHubApi.GetReleases()
|
||||
$versionIndex = Build-VersionsManifest -Releases $releases -Configuration $configuration
|
||||
$versionIndex | ConvertTo-Json -Depth 5 | Out-File $OutputFile -Encoding UTF8NoBOM -Force
|
||||
|
||||
Reference in New Issue
Block a user