Workflow para criar issue quando uma estrela é dada #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Criar Issue de Boas Vindas ao Adicionar Estrela | |
on: | |
watch: | |
types: [started] | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
create_issue: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up GitHub user | |
id: get_user | |
run: | | |
echo "USERNAME=$(jq -r .sender.login $GITHUB_EVENT_PATH)" >> $GITHUB_ENV | |
- name: Criar um arquivo de issue personalizado | |
id: create_file | |
run: | | |
USERNAME=${{ env.USERNAME }} | |
TEMPLATE_PATH=".github/ISSUE_TEMPLATE/olar.md" | |
ISSUE_FILE=".github/ISSUE_TEMPLATE/issue_temp.md" | |
# Verifica se a variável USERNAME está definida | |
echo "Username is: $USERNAME" | |
# Substitui @seu_nome_de_usuário pelo nome do usuário no template | |
sed "s/seu_nome_de_usuário/${USERNAME}/g" $TEMPLATE_PATH > $ISSUE_FILE | |
- name: Criando uma issue de boas-vindas | |
uses: peter-evans/create-issue-from-file@v4 | |
with: | |
title: "Boas vindas ao GitCaos 🔥!" | |
content-filepath: .github/ISSUE_TEMPLATE/issue_temp.md | |
labels: 'praticando-na-solidão' | |
assignees: 'seu_nome_de_usuário' |