Weekly MTG #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |