From 24465d1e89aa2c04844b7d54e5c95e1109690eb5 Mon Sep 17 00:00:00 2001 From: naanadr Date: Tue, 23 Apr 2024 21:39:51 -0300 Subject: [PATCH] Atualiza cron do workflow boletim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Workflow irá executar todo dia 1, e irá utilizar o dia anterior como base para definir o titulo da issue --- .github/workflows/boletim.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/boletim.yaml b/.github/workflows/boletim.yaml index 3609001..0618973 100644 --- a/.github/workflows/boletim.yaml +++ b/.github/workflows/boletim.yaml @@ -3,7 +3,7 @@ name: Boletim Mensal on: workflow_dispatch: schedule: - - cron: 0 0 25 * * + - cron: 0 0 1 * * env: LANG: "pt_BR.UTF-8" @@ -23,10 +23,6 @@ jobs: sudo locale-gen pt_BR.UTF-8 sudo update-locale LANG=pt_BR.UTF-8 - - name: date - run: | - date - - name: Extrai conteúdo do template boletim.md uses: imjohnbo/extract-issue-template-fields@v0.0.1 id: extract @@ -37,8 +33,8 @@ jobs: id: script run: | # Define título - month=$(date +%B) - year=$(date +%Y) + month=$(date -d '1 day ago' +%B) + year=$(date -d '1 day ago' +%Y) title="Boletim Informativo de $month de $year" echo "::set-output name=title::$title" @@ -48,7 +44,7 @@ jobs: assignees[2]="naanadr" assignees[3]="anicelysantos" - month=$(date +%m) + month=$(date -d '1 day ago' +%m) size=${#assignees[@]} index=$(($month % $size)) echo "::set-output name=assignee::${assignees[$index]}"