Compare commits

...

37 Commits

Author SHA1 Message Date
Haritha
816a9a3331 Refactor Pester installation step in workflow 2025-11-03 12:07:42 -06:00
Haritha
6c48f687bd Install Pester before running tests
Added a step to install Pester before running tests.
2025-11-03 11:53:28 -06:00
Haritha
e60ec8ae98 Update Pester invocation with configuration options 2025-11-03 11:29:12 -06:00
HarithaVattikuti
db2ae0a36e chore: update macOS version in build workflow to 15-intel 2025-11-03 10:38:51 -06:00
dependabot[bot]
6fdf7f098f Bump actions/download-artifact from 4 to 5 (#88)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-17 14:43:33 -05:00
dependabot[bot]
4ae553a74d Bump actions/checkout from 4 to 5 (#90)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-17 14:42:45 -05:00
Haritha
13ba3fd9e0 Replace self hosted with arm runners (#85) 2025-07-29 12:01:39 -05:00
Ben De St Paer-Gotch
552a1a5fda Merge pull request #86 from actions/nebuk89-patch-1
Update README.md
2025-06-12 10:28:55 +01:00
Ben De St Paer-Gotch
1e5d44c7a5 Update README.md 2025-06-06 11:58:24 +01:00
HarithaVattikuti
817eacd539 Create dependabot.yml (#83) 2025-01-23 09:37:14 -06:00
HarithaVattikuti
933aacb90a Add permission section (#84) 2025-01-16 08:45:16 -06:00
HarithaVattikuti
d3c3feee4b Point to ubuntu-22.04 (#82) 2025-01-08 22:43:01 -06:00
Priya Gupta
4028baf988 Replace deprecated release action with GitHub CLI (#80) 2024-11-12 21:15:45 -06:00
aparnajyothi-y
d30950623a Upgrade the checkout to V4 (#79)
* Update versions to latest

* Update create-pr-to-update-manifest.yml

* Update get-new-tool-versions.yml

* Update get-tools-new-versions.yml

* Update validate-manifest.yml
2024-11-12 21:11:54 -06:00
gowridurgad
16b7940fde Add test jobs for arm64 architecture (#76)
* Update build-tool-packages.yml

* Update build-tool-packages.yml

* Update build-tool-packages.yml

* added RUNNER_TYPE

---------

Co-authored-by: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com>
Co-authored-by: gowridurgad <gowridurga@github.com>
2024-07-09 09:46:50 -05:00
HarithaVattikuti
94d413c5d2 Add win arm64 package availability check (#77) 2024-07-09 09:02:48 -05:00
aparnajyothi-y
6d641c49d7 Fix for windows arm64 node js package (7z) file (#75)
* Update build-tool-packages.yml

* Update and rename build-tool-packages.yml to build-tool-packages.ymll

* Rename build-tool-packages.ymll to build-tool-packages.yml
2024-06-18 12:10:29 -05:00
aparnajyothi-y
447803d00a Architecture update for the test cases of darwin based on macos-14 configuration update (#73)
* macos-latest-large update

* Update build-tool-packages.yml

* Update build-tool-packages.yml

* Update build-tool-packages.yml

* Update build-tool-packages.yml

* Update build-tool-packages.yml

* Update build-tool-packages.yml

* Update build-tool-packages.yml

* Update build-tool-packages.yml

* Update build-tool-packages.yml

* Update build-tool-packages.yml

* Update build-tool-packages.yml

* Update build-tool-packages.yml

* Update build-tool-packages.yml

* Update build-tool-packages.yml
2024-04-29 08:38:37 -05:00
HarithaVattikuti
b549ccbeee Fix for windows arm64 node js package (7z) file (#72)
* Update build-tool-packages.yml

* Fix for arm64 node
2024-03-28 23:04:25 -05:00
aparnajyothi-y
760646fc29 Add support for arm64 packaging on linux and windows for setup-node (#68)
* arm64 packagging on setup-node

* if condition change

* adding arm64 for entire windows and linux

* error fix

* asser install
2024-03-18 08:21:09 -05:00
Dmitry Shibanov
a8a2c841ba Add automatic build of arm64 for macOS (#66) 2023-11-07 11:51:31 +01:00
Dmitry Shibanov
6fbb1f0f20 Add logic to generate hash file (#65) 2023-09-21 15:34:23 +02:00
Marko Zivic
b964a9871b Merge pull request #62 from erik-bershel/rename-VE-to-RI
Rename 'virtual-environments' repo to 'runner-images'
2022-12-27 10:48:32 +01:00
Marko Zivic
d4cf796ec9 Merge pull request #61 from e-korolevskii/patch-1
Update CODEOWNERS
2022-12-27 09:25:14 +01:00
Erik Bershel
b8e79c3d16 Rename 'virtual-environments' repo to 'runner-images' 2022-12-26 13:23:01 +01:00
Evgenii Korolevskii
b43c6cc8fd Update CODEOWNERS 2022-12-26 13:17:25 +01:00
MaksimZhukov
5810329d19 Introduce reusable workflows into versions repositories (#60) 2022-12-02 12:36:59 +01:00
Aleksandr Chebotov
896369fc7d Replace set output (#59) 2022-10-28 18:08:30 +02:00
Aleksandr Chebotov
d25937e581 Replace var $GITHUB_OUTPUT to $env:GITHUB_OUTPUT (#58) 2022-10-28 17:34:40 +02:00
Aleksandr Chebotov
c08a90cad6 Update workflow tasks (#57) 2022-10-28 14:39:22 +02:00
Aleksandr Chebotov
2c15878a9d Update SLACK_CHANNEL_HOOK secret (#56) 2022-09-08 10:37:51 +02:00
Dusko Dobranic
7b3aff2ad5 Merge pull request #55 from actions/xamarin-update-channel
Update Xamarin channel link
2022-08-10 09:29:20 +02:00
Aleksandr Chebotov
81e64845b7 Update Xamarin channel link 2022-08-10 09:08:34 +02:00
Mikhail Timofeev
56f47ea626 Merge pull request #54 from actions/miketimofeev-patch-1
Change macOS toolset to version 12 in xamarin parser
2022-06-01 17:07:28 +04:00
Mikhail Timofeev
c3143dd446 Update verify-xamarin-parser.psm1 2022-06-01 16:04:34 +03:00
Vladimir Safonkin
31f01aedc7 Get only LTS Node versions from node-versions manifest file (#53)
* Get only LTS Node versions from manifest

* Minor fix
2022-04-28 14:59:24 +02:00
Mikhail Timofeev
e6dbb79745 Merge pull request #52 from actions/shilovmaksim/remove-azdo-related-code
Remove AzDo related code
2022-02-28 10:35:50 +03:00
15 changed files with 543 additions and 22 deletions

2
.github/CODEOWNERS vendored
View File

@@ -1 +1 @@
* @actions/virtual-environments-owners * @actions/setup-actions-team

14
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
# Enable version updates for GitHub Actions
- package-ecosystem: 'github-actions'
# Workflow files stored in the default location of `.github/workflows`
# You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.
directory: '/'
schedule:
interval: 'weekly'

View File

@@ -0,0 +1,278 @@
# This reusable workflow is used by actions/*-versions repositories
# It is designed to
# - build and test new versions of a tool (Go, Node)
# - publish a release with a new tool version
# The GITHUB_TOKEN secret is used to trigger workflow runs and publish releases
name: Generate tool packages
on:
workflow_call:
inputs:
tool-name:
description: "Tool name to build and upload. Supported values are: 'go' and 'node'"
required: true
type: string
tool-version:
description: "Tool version to build and upload"
required: true
type: string
publish-release:
description: "Whether to publish releases"
required: true
type: boolean
defaults:
run:
shell: pwsh
jobs:
build:
name: Build ${{ inputs.tool-name }} ${{ inputs.tool-version }} [${{ matrix.platform }}] [${{ matrix.architecture }}]
runs-on: ubuntu-22.04
env:
ARTIFACT_NAME: ${{ inputs.tool-name }}-${{ inputs.tool-version }}-${{ matrix.platform }}-${{ matrix.architecture }}
excludewinarm: ${{ !(inputs.tool-name == 'node' && inputs['tool-version'] < '20.0.0' && matrix.architecture == 'arm64' && matrix.platform == 'win32') }}
strategy:
fail-fast: false
matrix:
platform: [linux, darwin, win32]
architecture: [x64, arm64]
steps:
- name: checkout
if: env.excludewinarm == 'true'
uses: actions/checkout@v5
with:
submodules: true
- name: Build ${{ inputs.tool-name }} ${{ inputs.tool-version }}
if: env.excludewinarm == 'true'
run: |
./builders/build-${{ inputs.tool-name }}.ps1 -Version ${{ inputs.tool-version }} `
-Platform ${{ matrix.platform }} `
-Architecture ${{ matrix.architecture }}
- name: Publish artifact
if: env.excludewinarm == 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ runner.temp }}/artifact
test:
name: Test ${{ inputs.tool-name }} ${{ inputs.tool-version }} [${{ matrix.platform }}] [${{ matrix.architecture }}]
needs: build
runs-on: ${{ matrix.os }}
env:
ARTIFACT_NAME: ${{ inputs.tool-name }}-${{ inputs.tool-version }}-${{ matrix.platform }}-${{ matrix.architecture }}
excludewinarm: ${{ !(inputs.tool-name == 'node' && inputs['tool-version'] < '20.0.0' && matrix.architecture == 'arm64' && matrix.platform == 'win32') }}
RUNNER_TYPE: ${{ matrix.runner_type }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: linux
architecture: x64
- os: macos-15-intel
platform: darwin
architecture: x64
- os: windows-latest
platform: win32
architecture: x64
- os: ubuntu-22.04-arm
platform: linux
architecture: arm64
- os: macos-latest
platform: darwin
architecture: arm64
- os: windows-11-arm
platform: win32
architecture: arm64
steps:
- name: checkout
if: env.excludewinarm == 'true'
uses: actions/checkout@v5
with:
submodules: true
- name: Fully cleanup the toolcache directory before testing
if: env.excludewinarm == 'true'
run: ./helpers/clean-toolcache.ps1 -ToolName "${{ inputs.tool-name }}"
- name: Download artifact
if: env.excludewinarm == 'true'
uses: actions/download-artifact@v5
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
- name: Extract files
if: env.excludewinarm == 'true'
run: |
if ('${{ matrix.platform }}' -eq 'win32') {
if ('${{ inputs.tool-name }}' -eq 'node') {
$artifactName = "${{ env.ARTIFACT_NAME }}.7z"
} elseif ('${{ inputs.tool-name }}' -eq 'go') {
$artifactName = "${{ env.ARTIFACT_NAME }}.zip"
} else {
Write-Host "Unsupported tool - ${{ inputs.tool-name }}"
exit 1
}
7z.exe x "$artifactName" -y | Out-Null
} else {
$artifactName = "${{ env.ARTIFACT_NAME }}.tar.gz"
tar -xzf $artifactName
}
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
- name: Apply build artifact to the local machine
if: env.excludewinarm == 'true'
run: |
if ('${{ matrix.platform }}' -eq 'win32') { powershell ./setup.ps1 }
else {
sh ./setup.sh
}
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
- name: Setup Node.js ${{ inputs.tool-version }}
if: env.excludewinarm == 'true' && inputs.tool-name == 'node'
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.tool-version }}
- name: Setup Go ${{ inputs.tool-version }}
if: inputs.tool-name == 'go'
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.tool-version }}
- name: Wait for the logs
if: env.excludewinarm == 'true'
run: |
Write-Host "Fake step that does nothing"
Write-Host "We need it because log from the previous step 'Setup ${{ inputs.tool-name }}' is not available here yet."
Write-Host "In testing step we analyze build log of 'Setup ${{ inputs.tool-name }}' task"
Write-Host "to determine if ${{ inputs.tool-name }} version was consumed from cache or if it was downloaded"
for ($i = 0; $i -lt 200; $i++) { Get-Random }
- name: Ensure Pester Installed
run: |
$module = Get-Module -ListAvailable -Name Pester
if (-not $module -or ($module.Version -lt [Version]"5.0.0")) {
Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck
}
- name: Run tests
if: env.excludewinarm == 'true'
env:
VERSION: ${{ inputs.tool-version }}
run: |
Import-Module Pester
$toolName = (Get-Culture).TextInfo.ToTitleCase("${{ inputs.tool-name }}")
Invoke-Pester -Configuration @{
Run = @{ Path = "./$toolName.Tests.ps1" }
Should = @{ ErrorAction = 'Continue' }
Output = @{ EnableExit = $true }
}
working-directory: ./tests
# - name: Run tests
# if: env.excludewinarm == 'true'
# env:
# VERSION: ${{ inputs.tool-version }}
# run: |
# Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck
# Import-Module Pester
# $toolName = (Get-Culture).TextInfo.ToTitleCase("${{ inputs.tool-name }}")
# Invoke-Pester -Configuration @{
# Run = @{ Path = "./$toolName.Tests.ps1" }
# Should = @{ ErrorAction = 'Continue' }
# Output = @{ EnableExit = $true }
# }
# working-directory: ./tests
publish_release:
name: Publish release
if: inputs.publish-release
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v5
- name: Generate release body
id: generate-release-body
run: |
if ('${{ inputs.tool-name }}' -eq 'node') {
$releaseBody = 'Node.js ${{ inputs.tool-version }}'
} else {
$releaseBody = 'Go ${{ inputs.tool-version }}'
}
echo "RELEASE_BODY=$releaseBody" >> $env:GITHUB_OUTPUT
- name: Publish Release
id: create_release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
tag_name="${{ inputs.tool-version }}-${{ github.run_id }}"
gh release create "$tag_name" \
--repo="$GITHUB_REPOSITORY" \
--title="${{ inputs.tool-version }}" \
--notes="${{ steps.generate-release-body.outputs.RELEASE_BODY }}"
release_id=$(gh release view "$tag_name" --repo "$GITHUB_REPOSITORY" --json databaseId --jq '.databaseId')
echo "id=$release_id" >> $GITHUB_OUTPUT
- name: Generate hash for packages
run: |
$childItems = Get-Childitem -Path '.'
$childItems | Foreach-Object {
$packageObj = Get-Childitem -Path $_.FullName | Select-Object -First 1
Write-Host "Package: $($packageObj.Name)"
$actualHash = (Get-FileHash -Path $packageObj.FullName -Algorithm sha256).Hash
$hashString = "$actualHash $($packageObj.Name)"
Write-Host "$hashString"
Add-Content -Path ./hashes.sha256 -Value "$hashString"
}
- name: Upload release assets
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
for (let artifactDir of fs.readdirSync('.')) {
let artifactName = fs.lstatSync(artifactDir).isDirectory() ? fs.readdirSync(`${artifactDir}`)[0] : artifactDir;
console.log(`Upload ${artifactName} asset`);
github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: ${{ steps.create_release.outputs.id }},
name: artifactName,
data: fs.lstatSync(artifactDir).isDirectory() ? fs.readFileSync(`./${artifactDir}/${artifactName}`) : fs.readFileSync(`./${artifactName}`).toString()
});
}
trigger_pr:
name: Trigger "Create Pull Request" workflow
needs: publish_release
runs-on: ubuntu-latest
steps:
- name: Trigger "Create Pull Request" workflow
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'create-pr.yml',
ref: 'main'
});

View File

@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v5
- name: Install Pester - name: Install Pester
shell: pwsh shell: pwsh
@@ -20,4 +20,4 @@ jobs:
run: | run: |
Import-Module Pester Import-Module Pester
Import-Module Assert Import-Module Assert
Invoke-Pester -EnableExit Invoke-Pester -EnableExit

View File

@@ -0,0 +1,43 @@
# This reusable workflow is used by actions/*-versions repositories
# It is designed to create a PR with update of versions-manifest.json when a new release is published
# The GITHUB_TOKEN secret is used to create versions-manifest.json and publish related PR
name: Create Pull Request
on:
workflow_call:
inputs:
tool-name:
description: 'Name of the tool for which PR is created'
required: true
type: string
defaults:
run:
shell: pwsh
jobs:
create_pr:
name: Create Pull Request
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
submodules: true
- name: Create versions-manifest.json
run: |
./helpers/packages-generation/manifest-generator.ps1 -RepositoryFullName "$env:GITHUB_REPOSITORY" `
-GitHubAccessToken "${{ secrets.GITHUB_TOKEN }}" `
-OutputFile "./versions-manifest.json" `
-ConfigurationFile "./config/${{ inputs.tool-name }}-manifest-config.json"
- name: Create GitHub PR
run: |
$formattedDate = Get-Date -Format "MM/dd/yyyy"
./helpers/github/create-pull-request.ps1 `
-RepositoryFullName "$env:GITHUB_REPOSITORY" `
-AccessToken "${{ secrets.GITHUB_TOKEN }}" `
-BranchName "update-versions-manifest-file" `
-CommitMessage "Update versions-manifest" `
-PullRequestTitle "[versions-manifest] Update for release from ${formattedDate}" `
-PullRequestBody "Update versions-manifest.json for release from ${formattedDate}"

View File

@@ -0,0 +1,109 @@
# This reusable workflow is used by actions/*-versions repositories
# It is designed to check for new versions of a tool (Python, Node, etc.)
# The 'SLACK_CHANNEL_URL' secret must be added to the repository containing the caller workflow
# in order to publish messages to Slack.
# The 'Get Available Tools Versions - Publishing Approval' environment must be created in the repository containing the caller workflow
# The 'trigger_builds' job requires manual approval
# The GITHUB_TOKEN secret is used to cancel and trigger workflow runs
name: Get new tool versions
on:
workflow_call:
inputs:
tool-name:
description: 'Name of the tool for which versions are searched'
required: true
type: string
image-url:
description: 'Tool image to be attached to Slack posts'
required: true
type: string
defaults:
run:
shell: pwsh
jobs:
find_new_versions:
name: Find new versions
runs-on: ubuntu-latest
outputs:
versions_output: ${{ steps.Get_new_versions.outputs.TOOL_VERSIONS }}
steps:
- uses: actions/checkout@v5
with:
submodules: true
- id: Get_new_versions
name: Get new versions
run: ./helpers/get-new-tool-versions/get-new-tool-versions.ps1 -ToolName ${{ inputs.tool-name }}
check_new_versions:
name: Check new versions
runs-on: ubuntu-latest
needs: find_new_versions
env:
TOOL_VERSIONS: ${{needs.find_new_versions.outputs.versions_output}}
steps:
- uses: actions/checkout@v5
with:
submodules: true
- name: Check Versions
if: env.TOOL_VERSIONS == ''
run: |
Write-Host "No new versions were found"
Import-Module "./helpers/github/github-api.psm1"
$gitHubApi = Get-GitHubApi -RepositoryFullName "$env:GITHUB_REPOSITORY" `
-AccessToken "${{ secrets.GITHUB_TOKEN }}"
$gitHubApi.CancelWorkflow("$env:GITHUB_RUN_ID")
Start-Sleep -Seconds 60
- name: Send Slack notification
run: |
$pipelineUrl = "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID"
$message = "The following versions of '${{ inputs.tool-name }}' are available to upload: ${{ env.TOOL_VERSIONS }}\nLink to the pipeline: $pipelineUrl"
./helpers/get-new-tool-versions/send-slack-notification.ps1 -Url "${{ secrets.SLACK_CHANNEL_URL }}" `
-ToolName "${{ inputs.tool-name }}" `
-ImageUrl "${{ inputs.image-url }}" `
-Text "$message"
trigger_builds:
name: Trigger builds
runs-on: ubuntu-latest
needs: [find_new_versions, check_new_versions]
env:
TOOL_VERSIONS: ${{needs.find_new_versions.outputs.versions_output}}
environment: Get Available Tools Versions - Publishing Approval
steps:
- uses: actions/checkout@v5
with:
submodules: true
- name: Trigger "Build ${{ inputs.tool-name }} packages" workflow
run: |
$workflowFileName = "build-${{ inputs.tool-name }}-packages.yml".ToLower()
./helpers/github/run-ci-builds.ps1 -RepositoryFullName "$env:GITHUB_REPOSITORY" `
-AccessToken "${{ secrets.GITHUB_TOKEN }}" `
-WorkflowFileName "$workflowFileName" `
-WorkflowDispatchRef "main" `
-ToolVersions "${{ env.TOOL_VERSIONS }}" `
-PublishReleases "true"
check_build:
name: Check build for failures
runs-on: ubuntu-latest
needs: [find_new_versions, check_new_versions, trigger_builds]
if: failure()
steps:
- uses: actions/checkout@v5
with:
submodules: true
- name: Send Slack notification if build fails
run: |
$pipelineUrl = "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID"
$message = "The build of the '${{ inputs.tool-name }}' detection pipeline failed :progress-error:\nLink to the pipeline: $pipelineUrl"
./helpers/get-new-tool-versions/send-slack-notification.ps1 -Url "${{ secrets.SLACK_CHANNEL_URL }}" `
-ToolName "${{ inputs.tool-name }}" `
-Text "$message" `
-ImageUrl "${{ inputs.image-url }}"

View File

@@ -42,7 +42,7 @@ jobs:
name: 'Searching for new versions of ${{ matrix.tool.name }}' name: 'Searching for new versions of ${{ matrix.tool.name }}'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v5
- id: get-new-tool-versions - id: get-new-tool-versions
name: Get new tool versions name: Get new tool versions
run: | run: |
@@ -51,7 +51,7 @@ jobs:
-ReleasesUrl ${{ matrix.tool.releases-url }} ` -ReleasesUrl ${{ matrix.tool.releases-url }} `
-FilterParameter ${{ matrix.tool.filter-parameter }} ` -FilterParameter ${{ matrix.tool.filter-parameter }} `
-FilterArch ${{ matrix.tool.filter-arch }} -FilterArch ${{ matrix.tool.filter-arch }}
echo "::set-output name=versions-output::$versionsOutput" echo "versions-output=$versionsOutput" >> $env:GITHUB_OUTPUT
- name: Check versions - name: Check versions
if: steps.get-new-tool-versions.outputs.versions-output == '' if: steps.get-new-tool-versions.outputs.versions-output == ''
run: Write-Host "No new versions found" run: Write-Host "No new versions found"
@@ -59,7 +59,7 @@ jobs:
name: Send Slack notification name: Send Slack notification
if: steps.get-new-tool-versions.outputs.versions-output != '' if: steps.get-new-tool-versions.outputs.versions-output != ''
with: with:
url: ${{ secrets.SLACK_CHANNEL_URL }} url: ${{ secrets.SLACK_CHANNEL_HOOK }}
tool-name: '${{ matrix.tool.name }}' tool-name: '${{ matrix.tool.name }}'
tool-version: ${{ steps.get-new-tool-versions.outputs.versions-output }} tool-version: ${{ steps.get-new-tool-versions.outputs.versions-output }}
image-url: '${{ matrix.tool.image }}' image-url: '${{ matrix.tool.image }}'
@@ -71,7 +71,7 @@ jobs:
needs: [find-new-tool-versions] needs: [find-new-tool-versions]
if: failure() if: failure()
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v5
- id: get-failed-jobs - id: get-failed-jobs
name: Get failed jobs name: Get failed jobs
run: | run: |
@@ -79,11 +79,11 @@ jobs:
$failedJobs = (Invoke-RestMethod -Uri $jobs_url).jobs | $failedJobs = (Invoke-RestMethod -Uri $jobs_url).jobs |
Where-Object conclusion -eq "failure" | Where-Object conclusion -eq "failure" |
ForEach-Object {"\n\t" + $_.name.split(" ")[-1] + ": $($_.html_url)"} ForEach-Object {"\n\t" + $_.name.split(" ")[-1] + ": $($_.html_url)"}
echo "::set-output name=failed-jobs::$failedJobs" echo "failed-jobs=$failedJobs" >> $env:GITHUB_OUTPUT
- uses: ./.github/actions/send-slack-notification - uses: ./.github/actions/send-slack-notification
name: Send Slack notification about failure name: Send Slack notification about failure
with: with:
url: ${{ secrets.SLACK_CHANNEL_URL }} url: ${{ secrets.SLACK_CHANNEL_HOOK }}
tool-name: 'Tool name' tool-name: 'Tool name'
pipeline-url: '$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID' pipeline-url: '$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID'
text: "Missing toolset tool versions checker pipeline has failed jobs:/n/t${{ steps.get-failed-jobs.outputs.failed-jobs }}" text: "Missing toolset tool versions checker pipeline has failed jobs:/n/t${{ steps.get-failed-jobs.outputs.failed-jobs }}"

51
.github/workflows/validate-manifest.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
# This reusable workflow is used by actions/*-versions repositories
# It is designed to validate the versions-manifest.json file
# The 'SLACK_CHANNEL_URL' secret must be added to the repository containing the caller workflow
# in order to publish messages to Slack
name: Validate manifest
on:
workflow_call:
inputs:
tool-name:
description: 'Name of the tool for which manifest is validated'
required: true
type: string
image-url:
description: 'Tool image to be attached to Slack posts'
required: true
type: string
defaults:
run:
shell: pwsh
jobs:
validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
submodules: true
- name: Validate manifest
run: .\helpers\packages-generation\manifest-validator.ps1 -ManifestPath '.\versions-manifest.json'
check_build:
name: Check validation for failures
runs-on: ubuntu-latest
needs: [validation]
if: failure()
steps:
- uses: actions/checkout@v5
with:
submodules: true
- name: Send Slack notification if validation fails
run: |
$pipelineUrl = "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID"
$message = "The validation of ${{ inputs.tool-name }} manifest failed. \nLink to the pipeline: $pipelineUrl"
.\helpers\get-new-tool-versions\send-slack-notification.ps1 -Url "${{ secrets.SLACK_CHANNEL_URL }}" `
-ToolName "${{ inputs.tool-name }}" `
-Text "$message" `
-ImageUrl "${{ inputs.image-url }}"

View File

@@ -1,5 +1,29 @@
# Common tools for generation of packages in the actions/*-versions repositories # Common tools for generation of packages in the actions/*-versions repositories
This repository contains PowerShell modules that are used to generate packages for Actions. The packages are consumed by the images generated through [actions/virtual-environments](https://github.com/actions/virtual-environments) and some of the setup-* Actions This repository contains PowerShell modules that are used to generate packages for Actions. The packages are consumed by the images generated through [actions/runner-images](https://github.com/actions/runner-images) and some of the setup-* Actions
## Contribution ## Recommended permissions
Contributions are welcome! See [Contributor's Guide](./CONTRIBUTING.md) for more details about contribution process and code structure
When using the `versions-package-tools` in your GitHub Actions workflow, it is recommended to set the following permissions to ensure proper functionality:
```yaml
permissions:
contents: read # access to read repository's content
actions: read # access to reading actions
```
### Note
Thank you for your interest in this GitHub action, however, right now we are not taking contributions. Add commentMore actionsAdd commentMore actions
We continue to focus our resources on strategic areas that help our customers be successful while making developers' lives easier. While GitHub Actions remains a key part of this vision, we are allocating resources towards other areas of Actions and are not taking contributions to this repository at this time. The GitHub public roadmap is the best place to follow along for any updates on features were working on and what stage theyre in.
We are taking the following steps to better direct requests related to GitHub Actions, including:
1. We will be directing questions and support requests to our [Community Discussions area](https://github.com/orgs/community/discussions/categories/actions)
2. High Priority bugs can be reported through Community Discussions or you can report these to our support team https://support.github.com/contact/bug-report.
3. Security Issues should be handled as per our [security.md](security.md)
We will still provide security updates for this project and fix major breaking changes during this time.
You are welcome to still raise bugs in this repo.

View File

@@ -21,8 +21,7 @@ $VersionsToBuild = $VersionsFromDist | Where-Object { $VersionsFromManifest -not
if ($VersionsToBuild) { if ($VersionsToBuild) {
$availableVersions = $VersionsToBuild -join ", " $availableVersions = $VersionsToBuild -join ", "
Write-Host "The following versions are available to build:`n${availableVersions}" Write-Host "The following versions are available to build:`n${availableVersions}"
Write-Host "::set-output name=TOOL_VERSIONS::${availableVersions}" "TOOL_VERSIONS=${availableVersions}" >> $env:GITHUB_OUTPUT
Write-Host "##vso[task.setvariable variable=TOOL_VERSIONS;isOutput=true]${availableVersions}"
} else { } else {
Write-Host "There aren't versions to build" Write-Host "There aren't versions to build"
} }

View File

@@ -8,13 +8,15 @@ function Search-ToolsVersionsNotOnImage {
$stableReleases = (Invoke-RestMethod $ReleasesUrl) | Where-Object stable -eq $true $stableReleases = (Invoke-RestMethod $ReleasesUrl) | Where-Object stable -eq $true
$stableReleaseVersions = $stableReleases | ForEach-Object { $stableReleaseVersions = $stableReleases | ForEach-Object {
if ($ToolName -eq "Node") { if ($ToolName -eq "Node") {
$_.$FilterParameter.split(".")[0] + ".0" if ($_.lts) {
$_.$FilterParameter.split(".")[0] + ".0"
}
} else { } else {
$_.$FilterParameter.split(".")[0,1] -join"." $_.$FilterParameter.split(".")[0,1] -join"."
} }
} | Select-Object -Unique } | Select-Object -Unique
$toolsetUrl = "https://raw.githubusercontent.com/actions/virtual-environments/main/images/win/toolsets/toolset-2022.json" $toolsetUrl = "https://raw.githubusercontent.com/actions/runner-images/main/images/win/toolsets/toolset-2022.json"
$latestMinorVersion = (Invoke-RestMethod $toolsetUrl).toolcache | $latestMinorVersion = (Invoke-RestMethod $toolsetUrl).toolcache |
Where-Object {$_.name -eq $ToolName -and $_.arch -eq $FilterArch} | Where-Object {$_.name -eq $ToolName -and $_.arch -eq $FilterArch} |
ForEach-Object {$_.versions.Replace("*","0")} | ForEach-Object {$_.versions.Replace("*","0")} |

View File

@@ -6,7 +6,7 @@ function Search-XamarinVersionsNotOnImage {
$xamarinReleases = (Invoke-RestMethod $ReleasesUrl).items $xamarinReleases = (Invoke-RestMethod $ReleasesUrl).items
$filteredReleases = $xamarinReleases | Where-Object {$_.name -in $FilterProducts.name} | Sort-Object name | Select-Object name, version $filteredReleases = $xamarinReleases | Where-Object {$_.name -in $FilterProducts.name} | Sort-Object name | Select-Object name, version
$toolsetUrl = "https://raw.githubusercontent.com/actions/virtual-environments/main/images/macos/toolsets/toolset-11.json" $toolsetUrl = "https://raw.githubusercontent.com/actions/runner-images/main/images/macos/toolsets/toolset-12.json"
$uploadedReleases = (Invoke-RestMethod $toolsetUrl).xamarin $uploadedReleases = (Invoke-RestMethod $toolsetUrl).xamarin
$releasesOnImage = @() $releasesOnImage = @()
foreach ($FilterProduct in $FilterProducts) { foreach ($FilterProduct in $FilterProducts) {
@@ -16,4 +16,4 @@ function Search-XamarinVersionsNotOnImage {
'{0,-15} : {1}' -f $_.name, $_.version '{0,-15} : {1}' -f $_.name, $_.version
} }
return $versionsToAdd return $versionsToAdd
} }

View File

@@ -22,7 +22,7 @@ if ($ToolName -in "Python", "PyPy", "Node", "Go") {
} }
if ($ToolName -eq "Xamarin") { if ($ToolName -eq "Xamarin") {
$xamarinReleases = "http://aka.ms/manifest/stable" $xamarinReleases = "http://aka.ms/manifest/stable-2022"
$xamarinProducts = @( $xamarinProducts = @(
[PSCustomObject] @{name = 'Mono Framework'; property = 'mono-versions'} [PSCustomObject] @{name = 'Mono Framework'; property = 'mono-versions'}
[PSCustomObject] @{name = 'Xamarin.Android'; property = 'android-versions'} [PSCustomObject] @{name = 'Xamarin.Android'; property = 'android-versions'}

View File

@@ -77,6 +77,7 @@ Describe "Build-VersionsManifest" {
$assets = @( $assets = @(
@{ name = "python-3.8.3-linux-16.04-x64.tar.gz"; browser_download_url = "fake_url"; } @{ name = "python-3.8.3-linux-16.04-x64.tar.gz"; browser_download_url = "fake_url"; }
@{ name = "python-3.8.3-linux-18.04-x64.tar.gz"; browser_download_url = "fake_url"; } @{ name = "python-3.8.3-linux-18.04-x64.tar.gz"; browser_download_url = "fake_url"; }
@{ name = "hashes.sha256"; browser_download_url = "fake_url"; }
) )
$configuration = @{ $configuration = @{
regex = "python-\d+\.\d+\.\d+-(\w+)-([\w\.]+)?-?(x\d+)"; regex = "python-\d+\.\d+\.\d+-(\w+)-([\w\.]+)?-?(x\d+)";

View File

@@ -67,7 +67,7 @@ function Build-VersionsManifest {
$ltsStatus = Get-VersionLtsStatus -Version $versionKey -LtsRules $ltsRules $ltsStatus = Get-VersionLtsStatus -Version $versionKey -LtsRules $ltsRules
$stable = $version.PreReleaseLabel ? $false : $true $stable = $version.PreReleaseLabel ? $false : $true
[array]$releaseAssets = $release.assets | ForEach-Object { New-AssetItem -ReleaseAsset $_ -Configuration $Configuration } [array]$releaseAssets = $release.assets | Where { $_.Name -ne "hashes.sha256" } | ForEach-Object { New-AssetItem -ReleaseAsset $_ -Configuration $Configuration }
$versionHash = [PSCustomObject]@{} $versionHash = [PSCustomObject]@{}
$versionHash | Add-Member -Name "version" -Value $versionKey -MemberType NoteProperty $versionHash | Add-Member -Name "version" -Value $versionKey -MemberType NoteProperty