Skip to content

Terraform iac 2

Terraform iac 2 #4

Workflow file for this run

name: Compras SSH
env:

Check failure on line 3 in .github/workflows/ssh.yml

View workflow run for this annotation

GitHub Actions / Compras SSH

Invalid workflow file

The workflow is not valid. .github/workflows/ssh.yml (Line: 3, Col: 5): Unexpected value '' .github/workflows/ssh.yml (Line: 4, Col: 1): Unexpected value 'SSH_PRIVATE_KEY'
SSH_PRIVATE_KEY: ${{ secrets.PEM_FILE }}
REMOTE_USER: ec2-user
REMOTE_HOST: ${{ vars.AWS_DEV_HOST }}
APP_NAME: app.js
on:
push:
branches:
- gonzalo-compras # Cambiar a la rama correspondiente si es diferente
jobs:
ssh_job:
name: SSH Job
runs-on: ubuntu-latest # Se puede cambiar a otra versión o SO según sea necesario
steps:
- name: Ejecutar comando SSH
uses: appleboy/[email protected]
with:
host: ${{ env.REMOTE_HOST }}
username: ${{ env.REMOTE_USER }}
key: ${{ secrets.PEM_FILE }}
script: |
sudo rm -rf /opt/compras || true