-
Notifications
You must be signed in to change notification settings - Fork 13
32 lines (32 loc) · 998 Bytes
/
fix-nbsp.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
name: "Buscar e remover Non-breaking Spaces"
on:
pull_request:
push:
jobs:
fix:
runs-on: ubuntu-latest
# Não rodar em forks, já que forks não tem acesso a secrets.
if: ${{ !github.event.pull_request.head.repo.fork }}
steps:
- name: Autenticar bot
uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: 251209
private_key: ${{ secrets.GELOS_BOT_KEY }}
- name: Configurar git
run: |
git config --global user.name "gelos-bot"
git config --global user.email "gelos-bot[bot]@users.noreply.github.com"
- name: Baixar repositório
uses: actions/checkout@v3
with:
token: ${{ steps.generate-token.outputs.token }}
- name: Instalar nix
uses: cachix/install-nix-action@v18
- name: Remover NBSPs
run: |
nix run .#remove-nbsp
- name: Commitar alterações
run: |
git commit . -m "fix: remover NBSPs" && git push || echo "Nada para commitar"