From 9be4c52826bd55bdf7560fa0e6a40358087847a9 Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Wed, 1 Sep 2021 18:25:40 +0300 Subject: [PATCH 1/8] Created validate-manifest.yml --- .github/workflows/validate-manifest.yml | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/validate-manifest.yml diff --git a/.github/workflows/validate-manifest.yml b/.github/workflows/validate-manifest.yml new file mode 100644 index 0000000..6137592 --- /dev/null +++ b/.github/workflows/validate-manifest.yml @@ -0,0 +1,47 @@ +name: Validate manifest + +on: + workflow_dispatch: + + schedule: + - cron: '0 8,20 * * *' + + pull_request: + branches: + - main +env: + TOOL_NAME: "Python" +defaults: + run: + shell: pwsh + +jobs: + validation: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Validate python-versions manifest + run: .\helpers\packages-generation\manifest-validator.ps1 -ManifestUrl https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json + + check_build: + name: Check validation for failures + runs-on: ubuntu-latest + needs: [validation] + if: failure() + steps: + - uses: actions/checkout@v2 + 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" From ae1d3a167afc36b2c8d11829b609924a3891a4d9 Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Wed, 1 Sep 2021 18:30:47 +0300 Subject: [PATCH 2/8] Added test changes --- .github/workflows/validate-manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-manifest.yml b/.github/workflows/validate-manifest.yml index 6137592..07f40bc 100644 --- a/.github/workflows/validate-manifest.yml +++ b/.github/workflows/validate-manifest.yml @@ -31,7 +31,7 @@ jobs: name: Check validation for failures runs-on: ubuntu-latest needs: [validation] - if: failure() + if: success() steps: - uses: actions/checkout@v2 with: From 9d8a813dadf270bb83079f3aeb454da6f606c481 Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Wed, 1 Sep 2021 21:30:45 +0300 Subject: [PATCH 3/8] Updated helpers submodule --- helpers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers b/helpers index f8f76ca..9f82304 160000 --- a/helpers +++ b/helpers @@ -1 +1 @@ -Subproject commit f8f76caff1878d249468db3d55f045c0b707493b +Subproject commit 9f82304f9c2bb460fb7bcd3911ddd1acb8342b7d From cc1f58e61a370dffdb9721fcfa6c5de8113647be Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Wed, 1 Sep 2021 21:39:47 +0300 Subject: [PATCH 4/8] Removed test data --- .github/workflows/validate-manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-manifest.yml b/.github/workflows/validate-manifest.yml index 07f40bc..6137592 100644 --- a/.github/workflows/validate-manifest.yml +++ b/.github/workflows/validate-manifest.yml @@ -31,7 +31,7 @@ jobs: name: Check validation for failures runs-on: ubuntu-latest needs: [validation] - if: success() + if: failure() steps: - uses: actions/checkout@v2 with: From 4db82a6ce66806f1938b1b54374dad385d843a87 Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Thu, 2 Sep 2021 10:14:09 +0300 Subject: [PATCH 5/8] Removed event --- .github/workflows/validate-manifest.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/validate-manifest.yml b/.github/workflows/validate-manifest.yml index 6137592..b62b41f 100644 --- a/.github/workflows/validate-manifest.yml +++ b/.github/workflows/validate-manifest.yml @@ -1,8 +1,6 @@ name: Validate manifest on: - workflow_dispatch: - schedule: - cron: '0 8,20 * * *' From 0075d770646f77163488d38b2e8d261fed14280a Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Thu, 9 Sep 2021 18:01:20 +0300 Subject: [PATCH 6/8] Added token --- .github/workflows/validate-manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-manifest.yml b/.github/workflows/validate-manifest.yml index b62b41f..b00a423 100644 --- a/.github/workflows/validate-manifest.yml +++ b/.github/workflows/validate-manifest.yml @@ -23,7 +23,7 @@ jobs: submodules: true - name: Validate python-versions manifest - run: .\helpers\packages-generation\manifest-validator.ps1 -ManifestUrl https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json + run: .\helpers\packages-generation\manifest-validator.ps1 -ManifestUrl https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json -AccessToken ${{ secrets.GITHUB_TOKEN }} check_build: name: Check validation for failures From cd4f6ca68bdfa919ad5d7582486111be75042574 Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Wed, 15 Sep 2021 10:59:16 +0300 Subject: [PATCH 7/8] Updated submodule --- helpers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers b/helpers index 9f82304..fb0eac4 160000 --- a/helpers +++ b/helpers @@ -1 +1 @@ -Subproject commit 9f82304f9c2bb460fb7bcd3911ddd1acb8342b7d +Subproject commit fb0eac418afb1bc64daf912879736133e63eef1e From ae216d3a0bc2b7e26696e35b476b4ef1e8e55b36 Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Wed, 15 Sep 2021 13:58:04 +0300 Subject: [PATCH 8/8] Updated event --- .github/workflows/validate-manifest.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-manifest.yml b/.github/workflows/validate-manifest.yml index b00a423..e86b854 100644 --- a/.github/workflows/validate-manifest.yml +++ b/.github/workflows/validate-manifest.yml @@ -5,8 +5,10 @@ on: - cron: '0 8,20 * * *' pull_request: - branches: + branches: - main + paths: + - 'versions-manifest.json' env: TOOL_NAME: "Python" defaults: