diff --git a/.github/actions/find-new-tool-versions/action.yml b/.github/actions/find-new-tool-versions/action.yml deleted file mode 100644 index 243c36b..0000000 --- a/.github/actions/find-new-tool-versions/action.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: 'Find new versions' -description: 'Find new versions of a tool' -inputs: - tool-name: - required: true - description: 'Name of a tool to search versions for. Like Xamarin or Python' - default: 'Xamarin' -outputs: - versions-output: - description: "New versions found" - value: ${{ steps.get-new-versions.outputs.versions-output }} -runs: - using: "composite" - steps: - - uses: actions/checkout@v2 - - id: get-new-versions - name: Get new versions - shell: pwsh - run: echo "::set-output name=versions-output::$(./get-new-tool-versions/verify-new-tool-version-added-to-image.ps1 -ToolName ${{ inputs.tool-name }})" diff --git a/.github/workflows/get-xamarin-versions.yml b/.github/workflows/get-xamarin-versions.yml index da15b6e..3021f8d 100644 --- a/.github/workflows/get-xamarin-versions.yml +++ b/.github/workflows/get-xamarin-versions.yml @@ -17,9 +17,8 @@ jobs: steps: - uses: actions/checkout@v2 - id: get-new-xamarin-versions - uses: ./.github/actions/find-new-tool-versions - with: - tool-name: 'Xamarin' + name: Get new Xamarin versions + run: echo "::set-output name=versions-output::$(./get-new-tool-versions/verify-new-tool-version-added-to-image.ps1 -ToolName Xamarin)" check-new-xamarin-versions: name: Verifying new Xamarin versions exist @@ -37,8 +36,6 @@ jobs: tool-name: 'Xamarin' tool-version: ${{ needs.find-new-xamarin-versions.outputs.versions-output }} image-url: 'https://avatars.githubusercontent.com/u/790012?s=200&v=4' - - name: Send Slack notification - run: Write-Host "New versions found '${{ needs.find-new-xamarin-versions.outputs.versions-output }}'" find-new-python-versions: name: Searching for new Python versions @@ -48,9 +45,8 @@ jobs: steps: - uses: actions/checkout@v2 - id: get-new-python-versions - uses: ./.github/actions/find-new-tool-versions - with: - tool-name: 'Python' + name: Get new Python versions + run: echo "::set-output name=versions-output::$(./get-new-tool-versions/verify-new-tool-version-added-to-image.ps1 -ToolName Python)" check-new-python-versions: name: Verifying new Python versions exist @@ -68,9 +64,7 @@ jobs: tool-name: 'Python' tool-version: ${{ needs.find-new-python-versions.outputs.versions-output }} image-url: 'https://www.python.org/static/community_logos/python-powered-h-100x130.png' - - name: Send Slack notification - run: Write-Host "New versions found '${{ needs.find-new-python-versions.outputs.versions-output }}'" - + check_build: name: Check build for failures runs-on: ubuntu-latest diff --git a/get-new-tool-versions/send-slack-notification.ps1 b/get-new-tool-versions/send-slack-notification.ps1 index 4e461bc..3c0f516 100644 --- a/get-new-tool-versions/send-slack-notification.ps1 +++ b/get-new-tool-versions/send-slack-notification.ps1 @@ -25,7 +25,7 @@ param( [ValidateNotNullOrEmpty()] [System.String]$ToolName, - [System.Array]$ToolVersion, + [System.String]$ToolVersion, [System.String]$PipelineUrl, [System.String]$ImageUrl = 'https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png', [System.String]$Text @@ -37,7 +37,7 @@ Import-Module $PSScriptRoot/helpers.psm1 -DisableNameChecking # Create JSON body if ([string]::IsNullOrWhiteSpace($Text)) { if ($toolName -in ("Xamarin", "Python")) { - $Text = "The following versions of '$toolName' are available, consider adding them to toolset: $($toolVersion | Out-string)" + $Text = "The following versions of '$toolName' are available, consider adding them to toolset: $toolVersion" } else { $Text = "The following versions of '$toolName' are available to upload: $toolVersion" }