-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (27 loc) · 1.08 KB
/
Copy pathmain.yml
File metadata and controls
27 lines (27 loc) · 1.08 KB
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
name: Notify twitter
on: [push]
permissions:
contents: read
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Get short commit message
id: short_commit_message
env:
HEAD_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
SHORT_MESSAGE=$(echo "$HEAD_COMMIT_MESSAGE" | tr -d '\n' | cut -c 1-50 | sed 's/[;&`'\'']/ /g')
echo "SHORT_MESSAGE=$SHORT_MESSAGE" >> $GITHUB_ENV
- uses: noweh/post-tweet-v2-action@v1.0
with:
message: |
Ei, pessoal! Confiram o que acabamos de atualizar no projeto:
Mensagem do Commit: ${{ env.SHORT_MESSAGE }}...
URL do Projeto: ${{ github.event.repository.html_url }}
Horário do Commit: ${{ github.event.head_commit.timestamp }}
Vem ver! #${{ join(github.event.repository.topics, ' #') }}
consumer-key: ${{ secrets.CONSUMER_KEY }}
consumer-secret: ${{ secrets.CONSUMER_SECRET }}
access-token: ${{ secrets.ACCESS_TOKEN }}
access-token-secret: ${{ secrets.ACCESS_TOKEN_SECRET }}