Skip to content

Commit c14a5de

Browse files
update .github/workflows/action.yml
1 parent 8d306d2 commit c14a5de

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

.github/workflows/action.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
1-
name: Criptografar IP da VPS
1+
name: Adicionar IP ao repositório
22

33
on:
4-
workflow_dispatch: # Aciona manualmente ou ajusta para on: [push] para disparar com push
4+
push:
5+
branches:
6+
- action # ajuste para a branch principal do seu repositório
57

68
jobs:
7-
encrypt-ip:
9+
add-ip-file:
810
runs-on: ubuntu-latest
911
steps:
10-
- name: Criptografar IP da VPS
12+
- name: Checkout do código
13+
uses: actions/checkout@v2
14+
15+
- name: Criar arquivo com IP
16+
run: echo "${{ secrets.IP }}" > ip.txt
17+
18+
- name: Adicionar arquivo ao repositório
1119
run: |
12-
# Ajuste o comando conforme necessário para extrair o IP da VPS
13-
IP="${{ secrets.IP }}"
14-
15-
# Criptografar o IP usando AES e salvar em um arquivo
16-
echo -n "$IP" | openssl enc -aes-256-cbc -a -salt -pass env:AES_KEY > ip_encrypted.txt
17-
18-
# Exibir o arquivo criptografado (opcional)
19-
cat ip_encrypted.txt
20+
git config --global user.email "actions@github.com"
21+
git config --global user.name "GitHub Actions"
22+
git add ip.txt
23+
git commit -m "Adicionar arquivo com IP ao repositório"
24+
git push
2025

0 commit comments

Comments
 (0)