From c14a5dee8cec6ed3a5fbc3ab24e576f0fb53b1e0 Mon Sep 17 00:00:00 2001 From: SEBASTIAN JN Date: Fri, 14 Jun 2024 16:14:48 -0300 Subject: [PATCH] update .github/workflows/action.yml --- .github/workflows/action.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 3f8352d..e4c1c9f 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -1,20 +1,25 @@ -name: Criptografar IP da VPS +name: Adicionar IP ao repositório on: - workflow_dispatch: # Aciona manualmente ou ajusta para on: [push] para disparar com push + push: + branches: + - action # ajuste para a branch principal do seu repositório jobs: - encrypt-ip: + add-ip-file: runs-on: ubuntu-latest steps: - - name: Criptografar IP da VPS + - name: Checkout do código + uses: actions/checkout@v2 + + - name: Criar arquivo com IP + run: echo "${{ secrets.IP }}" > ip.txt + + - name: Adicionar arquivo ao repositório run: | - # Ajuste o comando conforme necessário para extrair o IP da VPS - IP="${{ secrets.IP }}" - - # Criptografar o IP usando AES e salvar em um arquivo - echo -n "$IP" | openssl enc -aes-256-cbc -a -salt -pass env:AES_KEY > ip_encrypted.txt - - # Exibir o arquivo criptografado (opcional) - cat ip_encrypted.txt + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions" + git add ip.txt + git commit -m "Adicionar arquivo com IP ao repositório" + git push \ No newline at end of file