Skip to content

pulumi-cli-dev-version #34

pulumi-cli-dev-version

pulumi-cli-dev-version #34

env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
name: Update latest-dev-version
on:
repository_dispatch:
types:
- pulumi-cli-dev-version
jobs:
pull-request:
runs-on: ubuntu-latest
needs: update-latest-dev-version
steps:
- name: checkout docs repo
uses: actions/checkout@v2
- name: pull-request
uses: repo-sync/pull-request@v2
with:
source_branch: "pulumi/${{ github.run_id }}-${{ github.run_number }}"
destination_branch: "master"
pr_title: "Regen dev version pulumi@${{ github.event.client_payload.dev_version}}"
pr_body: "Automated PR"
pr_label: "automation/pulumi-cli-docs,automation/merge"
github_token: ${{ secrets.PULUMI_BOT_TOKEN }}
update-latest-dev-version:
runs-on: ubuntu-latest
steps:
- name: checkout docs repo
uses: actions/checkout@v2
- name: Update latest version
run: |
echo -n "${{ github.event.client_payload.dev_version }}" > ./static/latest-dev-version
- name: git status
run: git status && git diff
- name: commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "pulumi-bot"
git checkout -b pulumi/${{ github.run_id }}-${{ github.run_number }}
git add static/latest-dev-version
git commit -m "Updating latest pulumi dev version@${{ github.event.client_payload.dev_version }}"
git push origin pulumi/${{ github.run_id }}-${{ github.run_number }}
notify:
if: failure()
name: Send slack notification
runs-on: ubuntu-latest
needs: [pull-request, update-latest-dev-version]
steps:
- name: Slack Notification
uses: docker://sholung/action-slack-notify:v2.3.0
env:
SLACK_CHANNEL: docs-ops
SLACK_COLOR: "#F54242"
SLACK_MESSAGE: "cli docs build 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