running jobs only on my runner when I push #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Hello World | |
| # Trigger on push to all branches except main, PRs to main, or manual dispatch | |
| on: | |
| push: | |
| branches-ignore: | |
| - main | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: # Allows manual trigger from GitHub UI | |
| jobs: | |
| hello-world: | |
| runs-on: [self-hosted, '${{ github.actor }}'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Display timestamp | |
| run: echo "Workflow started at $(date)" | |
| - name: Say hello | |
| run: | | |
| echo "=========================================" | |
| echo "Hello World from Amazon Linux 2023!" | |
| echo "=========================================" | |
| echo "" | |
| echo "Runner information:" | |
| echo " Hostname: $(hostname)" | |
| echo " OS: $(cat /etc/os-release | grep PRETTY_NAME | cut -d'"' -f2)" | |
| echo " Kernel: $(uname -r)" | |
| echo " Architecture: $(uname -m)" | |
| echo "" | |
| echo "Current directory: $(pwd)" | |
| echo "Current user: $(whoami)" | |
| echo "" | |
| echo "Environment:" | |
| echo " GITHUB_REPOSITORY: $GITHUB_REPOSITORY" | |
| echo " GITHUB_REF: $GITHUB_REF" | |
| echo " GITHUB_SHA: $GITHUB_SHA" | |
| echo " RUNNER_NAME: $RUNNER_NAME" | |
| echo "" | |
| echo "System resources:" | |
| echo " CPU cores: $(nproc)" | |
| echo " Memory: $(free -h | grep Mem | awk '{print $2}')" | |
| echo "" | |
| echo "Installed tools:" | |
| echo " Git: $(git --version)" | |
| echo " OpenSSL: $(openssl version)" | |
| echo "" | |
| echo "Success! Your self-hosted runner is working! 🎉" |