Skip to content

Commit

Permalink
Atualiza cron do workflow boletim
Browse files Browse the repository at this point in the history
Workflow irá executar todo dia 1, e irá utilizar o dia anterior como base para definir o titulo da issue
  • Loading branch information
naanadr committed Apr 24, 2024
1 parent 996be29 commit 24465d1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/boletim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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/[email protected]
id: extract
Expand All @@ -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"
Expand All @@ -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]}"
Expand Down

0 comments on commit 24465d1

Please sign in to comment.