-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.22 KB
/
create_weekly_mtg_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
name: Weekly MTG
on:
schedule:
- cron: 15 21 * * 0 # at 6:15 Mon(JST)
- cron: 20 21 * * 0 # at 6:20 Mon(JST)
- cron: 20 00 * * 1 # at 9:20 Mon(JST) // 0時を2桁でもできることの確認
- cron: 00 09 * * 2 # at 18:00 Tue(JST)
jobs:
create_issue:
name: Create issue every Tuesday
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Get the current date
run: echo "NOW=`(TZ='Asia/Tokyo' date +'%m/%d.%a')`" >> $GITHUB_ENV
- name: echo NOW
run: echo NOW
- name: Create issue
run: |
new_issue_url=$(gh issue create \
--title "$TITLE" \
--label "$LABELS" \
--body "$BODY")
if [[ $PINNED == true ]]; then
gh issue pin "$new_issue_url"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NOW: (TZ='Asia/Tokyo' date +'%m/%d(%a)')
TITLE_: 【${{ env.NOW }}】MTG
LABELS: documentation
BODY: |
自動生成issueです
PINNED: true
# GitHub 公式より
# https://docs.github.com/en/actions/managing-issues-and-pull-requests/scheduling-issue-creation