mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 23:28:57 +00:00
Update CI actions according to demands (#7395)
This commit is contained in:
2
.github/workflows/macos-generation.yml
vendored
2
.github/workflows/macos-generation.yml
vendored
@@ -192,6 +192,7 @@ jobs:
|
|||||||
-PrintTopNLongest 25
|
-PrintTopNLongest 25
|
||||||
|
|
||||||
- name: Move vm to cold storage and clear datastore tag
|
- name: Move vm to cold storage and clear datastore tag
|
||||||
|
if: ${{ always() }}
|
||||||
run: |
|
run: |
|
||||||
$cpuCount = 3
|
$cpuCount = 3
|
||||||
$coresPerSocketCount = 3
|
$coresPerSocketCount = 3
|
||||||
@@ -203,6 +204,7 @@ jobs:
|
|||||||
-VIServer "${{ secrets.VISERVER_V2 }}" `
|
-VIServer "${{ secrets.VISERVER_V2 }}" `
|
||||||
-VIUserName "${{ env.VI_USER_NAME }}" `
|
-VIUserName "${{ env.VI_USER_NAME }}" `
|
||||||
-VIPassword "${{ env.VI_PASSWORD }}" `
|
-VIPassword "${{ env.VI_PASSWORD }}" `
|
||||||
|
-JobStatus "${{ job.status }}" `
|
||||||
-CpuCount "$cpuCount" `
|
-CpuCount "$cpuCount" `
|
||||||
-CoresPerSocketCount "$coresPerSocketCount" `
|
-CoresPerSocketCount "$coresPerSocketCount" `
|
||||||
-Memory "$memory"
|
-Memory "$memory"
|
||||||
|
|||||||
2
.github/workflows/macos11.yml
vendored
2
.github/workflows/macos11.yml
vendored
@@ -17,7 +17,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
macOS_11:
|
macOS_11:
|
||||||
if: ${{ (github.event.label.name == 'macos-all') || (github.event.label.name == 'macos-11') || (inputs.CUSTOM_REPOSITORY != '' && inputs.CUSTOM_REPOSITORY_COMMIT_HASH != '') || (github.event_name == 'schedule') }}
|
if: ${{ (github.event.label.name == 'macos-all') || (github.event.label.name == 'macos-11') || (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') }}
|
||||||
name: macOS-11_unstable.${{ github.run_id }}.${{ github.run_attempt }}
|
name: macOS-11_unstable.${{ github.run_id }}.${{ github.run_attempt }}
|
||||||
uses: ./.github/workflows/macos-generation.yml
|
uses: ./.github/workflows/macos-generation.yml
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.github/workflows/macos12.yml
vendored
2
.github/workflows/macos12.yml
vendored
@@ -17,7 +17,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
macOS_12:
|
macOS_12:
|
||||||
if: ${{ (github.event.label.name == 'macos-all') || (github.event.label.name == 'macos-12') || (inputs.CUSTOM_REPOSITORY != '' && inputs.CUSTOM_REPOSITORY_COMMIT_HASH != '') || (github.event_name == 'schedule') }}
|
if: ${{ (github.event.label.name == 'macos-all') || (github.event.label.name == 'macos-12') || (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') }}
|
||||||
name: macOS-12_unstable.${{ github.run_id }}.${{ github.run_attempt }}
|
name: macOS-12_unstable.${{ github.run_id }}.${{ github.run_attempt }}
|
||||||
uses: ./.github/workflows/macos-generation.yml
|
uses: ./.github/workflows/macos-generation.yml
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.github/workflows/ubuntu2004.yml
vendored
2
.github/workflows/ubuntu2004.yml
vendored
@@ -17,7 +17,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Ubuntu_2004:
|
Ubuntu_2004:
|
||||||
if: ${{ (github.event.label.name == 'ubuntu-all') || (github.event.label.name == 'ubuntu-2004') || (inputs.CUSTOM_REPOSITORY != '' && inputs.CUSTOM_REPOSITORY_COMMIT_HASH != '') || (github.event_name == 'schedule') }}
|
if: ${{ (github.event.label.name == 'ubuntu-all') || (github.event.label.name == 'ubuntu-2004') || (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') }}
|
||||||
uses: ./.github/workflows/ubuntu-win-generation.yml
|
uses: ./.github/workflows/ubuntu-win-generation.yml
|
||||||
with:
|
with:
|
||||||
image_name: 'ubuntu2004'
|
image_name: 'ubuntu2004'
|
||||||
|
|||||||
2
.github/workflows/ubuntu2204.yml
vendored
2
.github/workflows/ubuntu2204.yml
vendored
@@ -17,7 +17,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Ubuntu_2204:
|
Ubuntu_2204:
|
||||||
if: ${{ (github.event.label.name == 'ubuntu-all') || (github.event.label.name == 'ubuntu-2204') || (inputs.CUSTOM_REPOSITORY != '' && inputs.CUSTOM_REPOSITORY_COMMIT_HASH != '') || (github.event_name == 'schedule') }}
|
if: ${{ (github.event.label.name == 'ubuntu-all') || (github.event.label.name == 'ubuntu-2204') || (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') }}
|
||||||
uses: ./.github/workflows/ubuntu-win-generation.yml
|
uses: ./.github/workflows/ubuntu-win-generation.yml
|
||||||
with:
|
with:
|
||||||
image_name: 'ubuntu2204'
|
image_name: 'ubuntu2204'
|
||||||
|
|||||||
2
.github/workflows/windows2019.yml
vendored
2
.github/workflows/windows2019.yml
vendored
@@ -17,7 +17,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Windows_2019:
|
Windows_2019:
|
||||||
if: ${{ (github.event.label.name == 'windows-all') || (github.event.label.name == 'windows-2019') || (inputs.CUSTOM_REPOSITORY != '' && inputs.CUSTOM_REPOSITORY_COMMIT_HASH != '') || (github.event_name == 'schedule') }}
|
if: ${{ (github.event.label.name == 'windows-all') || (github.event.label.name == 'windows-2019') || (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') }}
|
||||||
uses: ./.github/workflows/ubuntu-win-generation.yml
|
uses: ./.github/workflows/ubuntu-win-generation.yml
|
||||||
with:
|
with:
|
||||||
image_name: 'windows2019'
|
image_name: 'windows2019'
|
||||||
|
|||||||
2
.github/workflows/windows2022.yml
vendored
2
.github/workflows/windows2022.yml
vendored
@@ -17,7 +17,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Windows_2022:
|
Windows_2022:
|
||||||
if: ${{ (github.event.label.name == 'windows-all') || (github.event.label.name == 'windows-2022') || (inputs.CUSTOM_REPOSITORY != '' && inputs.CUSTOM_REPOSITORY_COMMIT_HASH != '') || (github.event_name == 'schedule') }}
|
if: ${{ (github.event.label.name == 'windows-all') || (github.event.label.name == 'windows-2022') || (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') }}
|
||||||
uses: ./.github/workflows/ubuntu-win-generation.yml
|
uses: ./.github/workflows/ubuntu-win-generation.yml
|
||||||
with:
|
with:
|
||||||
image_name: 'windows2022'
|
image_name: 'windows2022'
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ param(
|
|||||||
[ValidateNotNullOrEmpty()]
|
[ValidateNotNullOrEmpty()]
|
||||||
[string]$VIPassword,
|
[string]$VIPassword,
|
||||||
|
|
||||||
|
[string]$JobStatus,
|
||||||
|
|
||||||
[int32]$CpuCount,
|
[int32]$CpuCount,
|
||||||
|
|
||||||
[int32]$CoresPerSocketCount,
|
[int32]$CoresPerSocketCount,
|
||||||
@@ -62,7 +64,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$vm = Get-VM $VMName
|
$vm = Get-VM $VMName
|
||||||
if ($env:AGENT_JOBSTATUS -eq 'Failed') {
|
if (($env:AGENT_JOBSTATUS -and $env:AGENT_JOBSTATUS -eq 'Failed') -or ($JobStatus -and $JobStatus -eq 'failure')) {
|
||||||
try {
|
try {
|
||||||
if($vm.PowerState -ne "PoweredOff") {
|
if($vm.PowerState -ne "PoweredOff") {
|
||||||
Stop-VM -VM $vm -Confirm:$false -ErrorAction Stop | Out-Null
|
Stop-VM -VM $vm -Confirm:$false -ErrorAction Stop | Out-Null
|
||||||
|
|||||||
Reference in New Issue
Block a user