forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 2.21 KB
/
open-enterprise-issue.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
name: Open Enterprise release or deprecation issue
# **What it does**: Checks if there is an Enterprise release or deprecation upcoming, and if so, opens an issue with the tasks to be completed.
# **Why we have it**: GHES releases and deprecations run on a predictable schedule, so we can automate some of the project management aspects.
# **Who does it impact**: Docs engineering, docs content.
on:
workflow_dispatch:
schedule:
- cron: '20 16 * * *' # Run every day at 16:20 UTC / 8:20 PST
permissions:
contents: read
jobs:
open_enterprise_issue:
name: Open Enterprise issue
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/node-npm-setup
- name: Check for existing release or deprecation issues
id: existingIssue
run: |
src/versions/scripts/check-for-enterprise-issues-by-label.js
env:
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}
- name: Update enterprise dates
if: steps.existingIssue.outputs.deprecationIssue == 'false' || steps.existingIssue.outputs.releaseIssue == 'false'
run: |
src/ghes-releases/scripts/update-enterprise-dates.js
env:
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}
- name: Create an enterprise release issue
if: steps.existingIssue.outputs.releaseIssue == 'false'
run: |
src/versions/scripts/create-enterprise-issue.js release
env:
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}
- name: Create an enterprise deprecation issue
if: steps.existingIssue.outputs.deprecationIssue == 'false'
run: |
src/versions/scripts/create-enterprise-issue.js deprecation
env:
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}
- uses: ./.github/actions/slack-alert
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
with:
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}