-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (63 loc) · 1.94 KB
/
ISSUE_CREATION_WORKFLOW.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# 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: 0 12 * * 4
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"
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 "next $DATE_WEEKDAY" +%d)
month_num=$(date -d "next $DATE_WEEKDAY" +%m)
month_var="MONTH_$month_num"
month=$(eval echo ${!month_var})
year=$(date -d "next $DATE_WEEKDAY" +%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.body.outputs.body }}"
project: ${{ steps.extract.outputs.project }}
pinned: false
close-previous: false