From 84b6aaeb97b609d90eecaf78ac8ef71c1dd56500 Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Thu, 2 Sep 2021 12:59:53 +0300 Subject: [PATCH 1/4] Added validate-manifest.yml --- .github/workflows/validate-manifest.yml | 45 +++++++++++++++++++++++++ 1 file changed, 45 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..dda1bde --- /dev/null +++ b/.github/workflows/validate-manifest.yml @@ -0,0 +1,45 @@ +name: Validate manifest + +on: + schedule: + - cron: '0 8,20 * * *' + + pull_request: + branches: + - main +env: + TOOL_NAME: "Node" +defaults: + run: + shell: pwsh + +jobs: + validation: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Validate node-versions manifest + run: .\helpers\packages-generation\manifest-validator.ps1 -ManifestUrl https://raw.githubusercontent.com/actions/node-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 node-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://nodejs.org/static/images/logo-hexagon-card.png" From 32573402836a16c6a6a647c4501a720f6c2cc49b Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Thu, 9 Sep 2021 18:00:01 +0300 Subject: [PATCH 2/4] 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 dda1bde..6fe23d8 100644 --- a/.github/workflows/validate-manifest.yml +++ b/.github/workflows/validate-manifest.yml @@ -23,7 +23,7 @@ jobs: submodules: true - name: Validate node-versions manifest - run: .\helpers\packages-generation\manifest-validator.ps1 -ManifestUrl https://raw.githubusercontent.com/actions/node-versions/main/versions-manifest.json + run: .\helpers\packages-generation\manifest-validator.ps1 -ManifestUrl https://raw.githubusercontent.com/actions/node-versions/main/versions-manifest.json -AccessToken ${{ secrets.GITHUB_TOKEN }} check_build: name: Check validation for failures From 09f8ea5c48e0846a7e15058b2a25ab35e22b3014 Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Wed, 15 Sep 2021 10:54:58 +0300 Subject: [PATCH 3/4] Updated submodule --- helpers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers b/helpers index 1eaa091..fb0eac4 160000 --- a/helpers +++ b/helpers @@ -1 +1 @@ -Subproject commit 1eaa091b6531cad000ee0c4585bfa97d3476b028 +Subproject commit fb0eac418afb1bc64daf912879736133e63eef1e From 2200e9ff3010bf7a471f4bc1e397c3fecfba35c7 Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Wed, 15 Sep 2021 13:57:21 +0300 Subject: [PATCH 4/4] 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 6fe23d8..3d5ec7f 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: "Node" defaults: