Skip to content

Commit 9be4c52

Browse files
Created validate-manifest.yml
1 parent 41e5bb2 commit 9be4c52

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Validate manifest
2+
3+
on:
4+
workflow_dispatch:
5+
6+
schedule:
7+
- cron: '0 8,20 * * *'
8+
9+
pull_request:
10+
branches:
11+
- main
12+
env:
13+
TOOL_NAME: "Python"
14+
defaults:
15+
run:
16+
shell: pwsh
17+
18+
jobs:
19+
validation:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
with:
25+
submodules: true
26+
27+
- name: Validate python-versions manifest
28+
run: .\helpers\packages-generation\manifest-validator.ps1 -ManifestUrl https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
29+
30+
check_build:
31+
name: Check validation for failures
32+
runs-on: ubuntu-latest
33+
needs: [validation]
34+
if: failure()
35+
steps:
36+
- uses: actions/checkout@v2
37+
with:
38+
submodules: true
39+
40+
- name: Send Slack notification if validation fails
41+
run: |
42+
$pipelineUrl = "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID"
43+
$message = "The validation of python-versions manifest failed. \nLink to the pipeline: $pipelineUrl"
44+
.\helpers\get-new-tool-versions\send-slack-notification.ps1 -Url "${{ secrets.SLACK_CHANNEL_URL }}" `
45+
-ToolName "${{ env.TOOL_NAME }}" `
46+
-Text "$message" `
47+
-ImageUrl "https://www.python.org/static/community_logos/python-powered-h-100x130.png"

0 commit comments

Comments
 (0)