Jafner.net/.gitea/workflows/hello-world.yaml
Joey Hafner 91f24ac272
Add manual input for domain name
Switch to key-based authentication
2024-09-06 14:20:29 -07:00

25 lines
542 B
YAML

name: SSH and echo to file
on:
push:
branches:
- main
workflow_dispatch:
inputs:
host:
description: 'Domain name of host to connect (e.g. jafner.net)'
required: true
jobs:
ssh:
runs-on: ubuntu-latest
steps:
- name: SSH into host
uses: appleboy/ssh-action@v1
with:
host: ${{ inputs.host }}
username: ${{ secrets.HOST_USERNAME }}
key: ${{ secrets.RUNNER_SSH_PRIVATEKEY }}
script: |
echo "Hello, world!" >> ~/hello.txt