-
Notifications
You must be signed in to change notification settings - Fork 221
57 lines (56 loc) · 2.1 KB
/
pulumi-cli-dev-version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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 "bot@pulumi.com"
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