Update workflows to use reusable ones
parent
dca364fcdb
commit
e997e9e934
@ -1,48 +1,21 @@
|
|||||||
name: Validate manifest
|
name: Validate manifest
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
# The GITHUB_TOKEN secret is used to create a PR
|
||||||
|
# The pull_request event will not be triggered by it
|
||||||
|
# That's one of the reasons we need the schedule to validate the versions-manifest.json file
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 8,20 * * *'
|
- cron: '0 8,20 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- 'versions-manifest.json'
|
- 'versions-manifest.json'
|
||||||
|
|
||||||
env:
|
|
||||||
TOOL_NAME: "Go"
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validation:
|
manifest:
|
||||||
runs-on: ubuntu-latest
|
uses: actions/versions-package-tools/.github/workflows/validate-manifest.yml@main
|
||||||
steps:
|
with:
|
||||||
- uses: actions/checkout@v2
|
tool-name: "Go"
|
||||||
with:
|
image-url: "https://go.dev/images/gopher-footer.jpg"
|
||||||
submodules: true
|
secrets: inherit
|
||||||
|
|
||||||
- name: Validate python-versions manifest
|
|
||||||
run: .\helpers\packages-generation\manifest-validator.ps1 -ManifestPath '.\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 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"
|
|
Loading…
Reference in New Issue