feat(gen): update #29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check links on schedule | ||
| on: | ||
| schedule: | ||
| - cron: "59 23 * * 0" # Runs every Sunday at 23:59 | ||
| push: # for testing purposes, do not merge | ||
| jobs: | ||
| linkcheck: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: filiph/[email protected] | ||
| with: | ||
| arguments: https://www.scaleway.com/en/docs/serverless/ >> linkcheck_output.txt | ||
| - name: Upload a Build Artifact | ||
| if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. | ||
| uses: actions/[email protected] | ||
| with: | ||
| name: linkcheck_output.txt | ||
| path: linkcheck_output.txt | ||
| - name: Send message to Slack | ||
| id: initial_message | ||
| if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. | ||
| uses: slackapi/[email protected] | ||
| with: | ||
| webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
| webhook-type: incoming-webhook | ||
| payload: | | ||
| text: "Link check results are available in :thread:." | ||
| - name: Parse output to variable | ||
| run: var=`$(<linkcheck_output.txt)` | ||
| - name: Reply with output of linkcheck | ||
| if: always() # Triggers step if previous step fails. Must be added to consecutive steps as well. | ||
| uses: slackapi/[email protected] # ref: https://github.com/slackapi/slack-github-action | ||
| with: | ||
| webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
| webhook-type: incoming-webhook | ||
| payload: | | ||
| thread_ts: "${{ steps.initial_message.outputs.ts }}" | ||
| text: "$var" | ||