mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-29 21:07:59 +08:00
added latest changes.
This commit is contained in:
5
.github/workflows/linter.yml
vendored
5
.github/workflows/linter.yml
vendored
@@ -23,3 +23,8 @@ jobs:
|
||||
VALIDATE_JSON: true
|
||||
VALIDATE_MD: true
|
||||
DEFAULT_BRANCH: ${{ github.base_ref }}
|
||||
|
||||
- name: Checking shebang lines in MacOS and Ubuntu releases.
|
||||
shell: powershell
|
||||
run: |
|
||||
./images.CI/shebang-linter.ps1
|
||||
|
||||
@@ -24,8 +24,8 @@ function Validate-Scripts {
|
||||
$PathUbuntu = "./images/linux/scripts"
|
||||
$PathMacOS = "./images/macos/provision"
|
||||
$ScriptsWithBrokenShebang = @()
|
||||
$ScriptsWithBrokenShebang += Validate-Scripts -Path $PathUbuntu -Pattern "#!/bin/bash -e"
|
||||
$ScriptsWithBrokenShebang += Validate-Scripts -Path $PathMacOS -Pattern "#!/bin/bash -e -o pipefail"
|
||||
$ScriptsWithBrokenShebang += Validate-Scripts -Path $PathUbuntu -ExpectedShebang "#!/bin/bash -e"
|
||||
$ScriptsWithBrokenShebang += Validate-Scripts -Path $PathMacOS -ExpectedShebang "#!/bin/bash -e -o pipefail"
|
||||
if ($ScriptsWithBrokenShebang.Length -gt 0) {
|
||||
$ScriptsWithBrokenShebang | ForEach-Object {
|
||||
Write-Warning "The following script does not contain shebang: '$_'"
|
||||
|
||||
Reference in New Issue
Block a user