Skip to content

.github/workflows/ISSUE_CREATION_WORKFLOW.yml #4

.github/workflows/ISSUE_CREATION_WORKFLOW.yml

.github/workflows/ISSUE_CREATION_WORKFLOW.yml #4

# This workflow uses actions that are not certified by GitHub.
# São fornecidas por terceiros e regidas por
# termos de serviço, política de privacidade e suporte separados
# documentação.
name: Weekly Team Sync
on:
workflow_dispatch:
inputs:
input:
description: "Criação de issue"
required: false
default: "Issue criada"
# schedule:
# - cron: 30 22 */14 * *
env:
MONTH_01: "Janeiro"
MONTH_02: "Fevereiro"
MONTH_03: "Março"
MONTH_04: "Abril"
MONTH_05: "Maio"
MONTH_06: "Junho"
MONTH_07: "Julho"
MONTH_08: "Agosto"
MONTH_09: "Setembro"
MONTH_10: "Outubro"
MONTH_11: "Novembro"
MONTH_12: "Dezembro"
# Change this variable for changing the meeting weekday
DATE_WEEKDAY: "wednesday"
# Change this variable for changing the meeting interval
INTERVAL: "14 days"
jobs:
create_issue:
name: Create team sync issue
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
issues: write
steps:
- name: Extract issue template and generate title
uses: imjohnbo/extract-issue-template-fields@v1
id: extract
with:
path: .github/ISSUE_TEMPLATE/reuniao.md
- name: Get meeting date
id: date
run: |
day=$(date -d "$INTERVAL" +%d)
month_num=$(date -d "$INTERVAL" +%m)
month_var="MONTH_$month_num"
month=$(eval echo ${!month_var})
year=$(date -d "$INTERVAL" +%Y)
meeting_date="$day de $month de $year"
echo "::set-output name=date::$meeting_date"
- name: Create meeting issue
uses: imjohnbo/issue-bot@v3
with:
assignees: ${{ steps.extract.outputs.assignees }}
labels: ${{ steps.extract.outputs.labels }}
title: "[Reunião] Geral: ${{ steps.date.outputs.date }}"
body: ${{ steps.extract.outputs.body }}
project: ${{ steps.extract.outputs.project }}
pinned: false
close-previous: false