Skip to content

self hosted

self hosted #7

Workflow file for this run

name: Build and Run Go Program
on: [push]
jobs:
build:
runs-on: self-hosted
steps:
- name: hostname
run: hostname
# - name: Checkout code
# uses: actions/checkout@v4
# - name: SSH
# env:
# SSH_AUTH_SOCK: /tmp/ssh_agent.sock
# SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
# SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
# SSH_HOST: ${{ secrets.SSH_HOST }}
# run: |
# mkdir -p /home/runner/.ssh
# ssh-keyscan $SSH_HOST >> /home/runner/.ssh/known_hosts
# echo "$SSH_PRIVATE_KEY" > /home/runner/.ssh/github_actions
# chmod 600 /home/runner/.ssh/github_actions
# ssh-agent -a $SSH_AUTH_SOCK > /dev/null
# ssh -i /home/runner/.ssh/github_actions $SSH_USERNAME@$SSH_HOST "echo 'Hello from GitHub Actions'"
# - name: Set up Go
# uses: actions/setup-go@v3
# with:
# go-version: "1.19"
# - name: Build Go program
# run: go build hello.go