Skip to content

Weekly MTG

Weekly MTG #16

name: Weekly MTG
on:
schedule:
# - cron: 30 21 * * 0 # at 6:30 Mon(JST) // 約8分遅延で成功
- cron: 00 00 15 07 1 # at 9:00 7/15 on Mon(JST) // 0時, 00分を2桁でもできることの確認
- cron: 00 09 16 07 2 # at 18:00 7/16 on Tue (JST) // ポジコンもどきとして設定。実際にやりたいrepositoryで同時間に設定。
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