Potential fix for code scanning alert no. 9: Workflow does not contai… #80
This file contains hidden or 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: 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 }} |