-
Notifications
You must be signed in to change notification settings - Fork 3.9k
73 lines (60 loc) · 2.21 KB
/
cut-nightly.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
61
62
63
64
65
66
67
68
69
70
71
72
73
# Cuts a new nightly branch on a schedule.
name: Cut Nightly Branch
on:
schedule:
# 1 a.m. PST / 12 a.m. PDT, Tuesdays through Saturdays.
- cron: '0 8 * * 2-6'
workflow_dispatch:
permissions:
contents: read
jobs:
cut-nightly:
environment: cut_nightly
if: github.repository == 'ampproject/amphtml'
name: Cut Nightly Branch
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Checkout Repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
fetch-depth: 100
- name: Set Up Node
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
with:
node-version: lts/*
- name: Set Up Environment
run: sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
- name: Install Dependencies
run: npm ci
- name: ⭐ Cut Nightly Branch ⭐
run: node --unhandled-rejections=strict build-system/release-workflows/cut-nightly.js
env:
GITHUB_TOKEN: ${{ secrets.AMPPROJECTBOT }}
create-issue-on-error:
if: failure()
needs: cut-nightly
permissions:
contents: read
issues: write
runs-on: ubuntu-latest
environment: create_issue_on_error
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Create issue on error
uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd # v2.9.1
with:
filename: .github/create_issue_on_error.md
env:
GITHUB_TOKEN: ${{ secrets.AMPPROJECTBOT }}
WORKFLOW_NAME: ${{ github.workflow }}
MENTION: '@ampproject/release-on-duty'
REPO_SLUG: ${{ github.repository }}
RUN_ID: ${{ github.run_id }}