forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (61 loc) · 1.79 KB
/
release-tagger.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
name: Release tagger
on:
workflow_dispatch:
inputs:
action:
description: 'tagger action (promote | rollback)'
required: true
head:
description: 'head AMP version'
required: true
base:
description: 'base AMP version'
required: true
channel:
description: 'release channel (beta-opt-in | beta-percent | stable | lts)'
required: true
sha:
description: 'commit sha'
required: true
permissions:
contents: read
jobs:
tagger:
environment: release_tagger
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: actions/checkout@v3
- run: bash ./.github/workflows/install_dependencies.sh
- name: Run tagger
run: |
node ./build-system/release-tagger/index.js \
--action ${{ github.event.inputs.action }} \
--head ${{ github.event.inputs.head }} \
--base ${{ github.event.inputs.base }} \
--channel ${{ github.event.inputs.channel }} \
--sha ${{ github.event.inputs.sha }}
env:
GITHUB_TOKEN: ${{ secrets.AMPPROJECTBOT }}
create-issue-on-error:
if: failure()
needs: tagger
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 }}