From 307dc6197a99bb86c64701994ba203c224b1f287 Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Wed, 1 Sep 2021 22:05:11 +0300 Subject: [PATCH 1/6] Added 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..0cd1e2e --- /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: "Go" +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/go-versions/main/versions-manifest.json + + check_build: + name: Check validation for failures + runs-on: ubuntu-latest + needs: [validation] + if: success() + 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 go-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://golang.org/lib/godoc/images/footer-gopher.jpg" From bf5a404e5b640d62e5c28cc8a97971238b9250c1 Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Wed, 1 Sep 2021 22:19:40 +0300 Subject: [PATCH 2/6] Changed 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 0cd1e2e..162dd28 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 7dad0a857d2a2290a5da50056e6debb00f07ce96 Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Thu, 2 Sep 2021 10:12:37 +0300 Subject: [PATCH 3/6] 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 162dd28..1aa0b50 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 187f998b007a0fcf6b7f15a6b7cf4c09ee875ebe Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Thu, 9 Sep 2021 18:02:16 +0300 Subject: [PATCH 4/6] 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 1aa0b50..b9bcf87 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/go-versions/main/versions-manifest.json + run: .\helpers\packages-generation\manifest-validator.ps1 -ManifestUrl https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json -AccessToken ${{ secrets.GITHUB_TOKEN }} check_build: name: Check validation for failures From 5735a29e98f8e56771ff083927232f252237e864 Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Wed, 15 Sep 2021 11:16:57 +0300 Subject: [PATCH 5/6] 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 38f14f667d8135c352df060342f7ac7863f2171c Mon Sep 17 00:00:00 2001 From: Yuriy-Kukushkin <87432006+Yuriy-Kukushkin@users.noreply.github.com> Date: Wed, 15 Sep 2021 13:58:37 +0300 Subject: [PATCH 6/6] 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 b9bcf87..0b1e0c9 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: "Go" defaults: