Scheduled jobs: Update How To Guides from examples repo #50
This file contains 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: "Scheduled jobs: Update tutorials" | |
on: | |
schedule: | |
- cron: '0 15 * * *' | |
workflow_dispatch: | |
jobs: | |
merge: | |
name: Update tutorials | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19.x | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.PULUMI_BOT_TOKEN }} | |
- name: Run mktutorial | |
run: | | |
./scripts/ci/mktutorial.sh | |
- name: Create a pull request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
branch: tutorials/refresh | |
author: Pulumi Bot <[email protected]> | |
committer: Pulumi Bot <[email protected]> | |
title: Update tutorials | |
labels: "automation/merge" | |
commit-message: Update tutorials | |
token: ${{ secrets.PULUMI_BOT_TOKEN }} | |
body: | | |
Regenerate all tutorials based on the latest available content at https://github.com/pulumi/examples. | |
notify: | |
if: failure() | |
name: Send slack notification | |
runs-on: ubuntu-latest | |
needs: [merge] | |
steps: | |
- name: Slack Notification | |
uses: docker://sholung/action-slack-notify:v2.3.0 | |
env: | |
SLACK_CHANNEL: docs-ops | |
SLACK_COLOR: "#F54242" | |
SLACK_MESSAGE: "update tutorials failure in pulumi/docs repo :meow_sad:" | |
SLACK_USERNAME: docsbot | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_ICON: https://www.pulumi.com/logos/brand/avatar-on-white.png |