-
Notifications
You must be signed in to change notification settings - Fork 11
81 lines (70 loc) · 2.45 KB
/
promote-beta-experimental-opt-in.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
74
75
76
77
78
79
80
81
# Promotes the current Nightly channel to Beta/Experimental opt-in on a schedule.
name: Promote Beta/Experimental opt-in Channels
on:
schedule:
# 1:30 a.m. PST / 12:30 a.m. PDT, Tuesdays.
- cron: '30 1 * * 2'
workflow_dispatch:
inputs:
amp-version:
description: 'AMP version number (13 digits)'
required: false
default: ''
type: string
auto-merge:
description: 'Enable PR auto-merge'
required: false
type: boolean
jobs:
promote-beta-experimental-opt-in:
uses: ampproject/cdn-configuration/.github/workflows/promote-reusable-workflow.yml@main
with:
channel-name: 'Beta/Experimental opt-in'
ts-file: 'promote-beta-experimental-opt-in.ts'
amp-version: ${{ github.event.inputs.amp-version }}
auto-merge: ${{ github.event.inputs.auto-merge }}
secrets:
access-token: ${{ secrets.ACCESS_TOKEN }}
get-missing-cherry-picks:
needs: promote-beta-experimental-opt-in
runs-on: ubuntu-latest
outputs:
fixes: ${{ steps.get-fixes.outputs.fixes }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Get fixes
id: get-fixes
run: npx tsx ./scripts/get-missing-cherry-picks-job.ts --amp_version="${{ github.event.inputs.amp-version }}"
cherry-pick-if-missing:
needs: get-missing-cherry-picks
if: needs.get-missing-cherry-picks.outputs.fixes
uses: ampproject/cdn-configuration/.github/workflows/cherry-pick.yml@main
with:
amp-version: ${{ github.event.inputs.amp-version }}
shas: ${{ needs.get-missing-cherry-picks.outputs.fixes }}
secrets:
access-token: ${{ secrets.ACCESS_TOKEN }}
create-issue-on-error:
if: failure()
needs: get-missing-cherry-picks
permissions:
contents: read
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Create issue on error
uses: JasonEtco/create-an-issue@v2
with:
filename: .github/create_issue_on_error.md
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
WORKFLOW_NAME: ${{ github.workflow }}
MENTION: '@ampproject/release-on-duty'
REPO_SLUG: ${{ github.repository }}
RUN_ID: ${{ github.run_id }}