2021-09-01 15:25:40 +00:00
|
|
|
name: Validate manifest
|
|
|
|
|
|
|
|
on:
|
2021-10-14 13:56:42 +00:00
|
|
|
schedule:
|
|
|
|
- cron: '0 8,20 * * *'
|
|
|
|
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2021-09-01 15:25:40 +00:00
|
|
|
- main
|
2021-10-14 13:56:42 +00:00
|
|
|
paths:
|
2021-09-15 10:58:04 +00:00
|
|
|
- 'versions-manifest.json'
|
2021-10-14 13:56:42 +00:00
|
|
|
|
2021-09-01 15:25:40 +00:00
|
|
|
env:
|
|
|
|
TOOL_NAME: "Python"
|
2021-10-14 13:56:42 +00:00
|
|
|
|
2021-09-01 15:25:40 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: pwsh
|
2021-10-14 13:56:42 +00:00
|
|
|
|
2021-09-01 15:25:40 +00:00
|
|
|
jobs:
|
|
|
|
validation:
|
2022-06-05 07:52:01 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2021-09-01 15:25:40 +00:00
|
|
|
steps:
|
2022-06-05 07:52:01 +00:00
|
|
|
- uses: actions/checkout@main
|
2021-10-14 13:56:42 +00:00
|
|
|
with:
|
2021-09-01 15:25:40 +00:00
|
|
|
submodules: true
|
2021-10-14 13:56:42 +00:00
|
|
|
|
|
|
|
- name: Validate python-versions manifest
|
|
|
|
run: .\helpers\packages-generation\manifest-validator.ps1 -ManifestPath '.\versions-manifest.json'
|
2021-09-01 15:25:40 +00:00
|
|
|
|
|
|
|
check_build:
|
|
|
|
name: Check validation for failures
|
2022-06-05 07:52:01 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2021-09-01 15:25:40 +00:00
|
|
|
needs: [validation]
|
2021-09-01 18:39:47 +00:00
|
|
|
if: failure()
|
2021-09-01 15:25:40 +00:00
|
|
|
steps:
|
2022-06-05 07:52:01 +00:00
|
|
|
- uses: actions/checkout@main
|
2021-09-01 15:25:40 +00:00
|
|
|
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 python-versions manifest failed. \nLink to the pipeline: $pipelineUrl"
|
|
|
|
.\helpers\get-new-tool-versions\send-slack-notification.ps1 -Url "${{ secrets.SLACK_CHANNEL_URL }}" `
|
|
|
|
-ToolName "${{ env.TOOL_NAME }}" `
|
|
|
|
-Text "$message" `
|
|
|
|
-ImageUrl "https://www.python.org/static/community_logos/python-powered-h-100x130.png"
|