You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
versions-package-tools/.github/workflows/get-tools-new-versions.yml

54 lines
1.9 KiB
YAML

name: Get tools new versions
on:
schedule:
- cron: '0 8 * * THU'
workflow_dispatch:
defaults:
run:
shell: pwsh
jobs:
find-new-tool-versions:
strategy:
matrix:
tool:
- name: 'Xamarin'
image: 'https://avatars.githubusercontent.com/u/790012?s=200&v=4'
- name: 'Python'
image: 'https://avatars.githubusercontent.com/u/1525981?s=200&v=4'
- name: 'PyPy'
image: 'https://avatars.githubusercontent.com/u/318667?s=200&v=4'
name: Searching for new tool versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: get-new-tool-versions
name: Get new tool versions
run: echo "::set-output name=versions-output::$(./get-new-tool-versions/verify-new-tool-version-added-to-image.ps1 -ToolName ${{ matrix.tool.name }})"
- name: Check versions
if: steps.get-new-tool-versions.outputs.versions-output == ''
run: Write-Host "No new versions found"
- uses: ./.github/actions/send-slack-notification
name: Send Slack notification
if: steps.get-new-tool-versions.outputs.versions-output != ''
with:
url: ${{ secrets.SLACK_CHANNEL_URL }}
tool-name: '${{ matrix.tool.name }}'
tool-version: ${{ steps.get-new-tool-versions.outputs.versions-output }}
image-url: '${{ matrix.tool.image }}'
add-to-toolset-flag: '-AddToToolsetFlag'
check_build:
name: Check build for failures
runs-on: ubuntu-latest
needs: [find-new-tool-versions]
if: failure()
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/send-slack-notification
with:
url: ${{ secrets.SLACK_CHANNEL_URL }}
tool-name: 'Python or Xamarin'
pipeline-url: '$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID'
text: "The build of the Xamarin or Python detection pipeline has failed stages:"