From 0636123919d440dc94e6d8ea9d635f6d744427f6 Mon Sep 17 00:00:00 2001 From: taga3s Date: Fri, 8 Nov 2024 12:49:19 +0900 Subject: [PATCH] add workflow --- ...cheduled-create-issue-for-weekly-blog.yaml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/scheduled-create-issue-for-weekly-blog.yaml diff --git a/.github/workflows/scheduled-create-issue-for-weekly-blog.yaml b/.github/workflows/scheduled-create-issue-for-weekly-blog.yaml new file mode 100644 index 0000000..d8778e6 --- /dev/null +++ b/.github/workflows/scheduled-create-issue-for-weekly-blog.yaml @@ -0,0 +1,24 @@ +name: Scheduled Create Issue For Weekly Blog + +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * 1' + +env: + GITHUB_TOKEN: ${{ github.token }} + +jobs: + create_issue: + name: Create Issue + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Get the publication date + env: + TZ: 'Asia/Tokyo' + run: echo "PUBLICATION_DATE=$(date '+%Y-%m-%d' --date 'next sunday')" >> $GITHUB_ENV + - name: Create Issue + run: | + gh issue create \ + --title "週報作成 ${{ env.PUBLICATION_DATE }}"