forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 2.01 KB
/
status-page.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
58
59
60
name: Update status.amp.dev
on:
issues:
types: [opened]
issue_comment:
types: [edited]
permissions:
contents: read
jobs:
status-page:
if: contains(github.event.issue.title, '🌸 Cherry-pick request')
runs-on: ubuntu-latest
environment: status_page
steps:
- uses: actions/setup-node@v2
with:
node-version: 16
- uses: actions/checkout@v2
- name: Add progress comment to cherry-pick issue for Stable and LTS
if: github.event_name == 'issues' && github.event.action == 'opened'
run: |
npm ci
node ./build-system/status-page/comment.js ${{ github.event.issue.number }} ${{ github.actor }}
env:
BODY: ${{ github.event.issue.body }}
GITHUB_TOKEN: ${{ secrets.AMPPROJECTBOT }}
- name: Sync status page with cherry-pick progress
if: github.event_name == 'issue_comment' && github.event.action == 'edited' && contains(github.event.comment.body, '🌸 Cherry-pick Progress 🌸')
run: |
npm ci
node ./build-system/status-page/incident.js ${{ github.event.issue.number }}
env:
BODY: ${{ github.event.issue.body }}
COMMENT_BEFORE: ${{ github.event.changes.body.from }}
COMMENT_AFTER: ${{ github.event.comment.body }}
STATUS_PAGE_ID: ${{ secrets.STATUS_PAGE_ID }}
STATUS_PAGE_TOKEN: ${{ secrets.STATUS_PAGE_TOKEN }}
create-issue-on-error:
if: failure()
needs: status-page
permissions:
contents: read
issues: write
runs-on: ubuntu-latest
environment: create_issue_on_error
steps:
- uses: actions/checkout@v3
- name: Create issue on error
uses: JasonEtco/create-an-issue@v2
with:
filename: .github/create_issue_on_error.md
env:
GITHUB_TOKEN: ${{ secrets.AMPPROJECTBOT }}
WORKFLOW_NAME: ${{ github.workflow }}
MENTION: '@ampproject/wg-infra'
REPO_SLUG: ${{ github.repository }}
RUN_ID: ${{ github.run_id }}