1
0
Fork 0
mirror of https://github.com/actions/go-versions synced 2024-11-14 01:22:38 +00:00
go-versions/.github/workflows/validate-manifest.yml

48 lines
1.5 KiB
YAML
Raw Normal View History

2021-09-01 19:05:11 +00:00
name: Validate manifest
on:
schedule:
- cron: '0 8,20 * * *'
pull_request:
2021-09-15 10:58:37 +00:00
branches:
2021-09-01 19:05:11 +00:00
- main
2021-09-15 10:58:37 +00:00
paths:
- 'versions-manifest.json'
2021-09-01 19:05:11 +00:00
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
2021-09-09 15:02:16 +00:00
run: .\helpers\packages-generation\manifest-validator.ps1 -ManifestUrl https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json -AccessToken ${{ secrets.GITHUB_TOKEN }}
2021-09-01 19:05:11 +00:00
check_build:
name: Check validation for failures
runs-on: ubuntu-latest
needs: [validation]
2021-09-01 19:19:40 +00:00
if: failure()
2021-09-01 19:05:11 +00:00
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"