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] 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"