Rename github-runner-installer to github-runner-starter #39
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: Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| env: | |
| # https://github.com/jonpugh/github-runner/settings/secrets/actions/JONPUGH_GITHUB_TOKEN_ADMIN | |
| GITHUB_TOKEN: "${{ secrets.JONPUGH_GITHUB_TOKEN_ADMIN }}" | |
| RUNNER_CONFIG_NAME: "jonpugh@github-runner.${{ github.run_id }}" | |
| jobs: | |
| create: | |
| name: Create Runner | |
| # Testing github hosted. | |
| # runs-on: jonpugh/github-runner | |
| runs-on: ubuntu-latest | |
| env: | |
| # Set unique name for each item in the matrix. | |
| RUNNER_CONFIG_NAME: "jonpugh@github-runner.${{ github.run_id }}.${{ matrix.runner }}" | |
| # Add consistent label for all runners. | |
| RUNNER_CONFIG_LABELS: "jonpugh@github-runner.${{ github.run_id }}" | |
| strategy: | |
| matrix: | |
| runner: [1,2,3] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Debug | |
| run: | | |
| echo "Who am I: $(whoami)@$(hostname -f)" | |
| echo "Where am I: $(pwd)" | |
| echo "Env:" | |
| env | grep GITHUB | |
| - name: Help | |
| run: | | |
| echo "Hi from .github/workflows/tests.yml!" | |
| ./github-runner-installer --help | |
| - name: Run | |
| run: | | |
| ./github-runner-installer \ | |
| --run \ | |
| --name=${RUNNER_CONFIG_NAME} \ | |
| --config-sh-options=--ephemeral | |
| - name: Run again | |
| run: | | |
| ./github-runner-installer \ | |
| --run \ | |
| --name=${RUNNER_CONFIG_NAME} \ | |
| --config-sh-options=--ephemeral | |
| run: | |
| name: Run Tasks | |
| runs-on: "jonpugh@github-runner.${{ github.run_id }}" | |
| strategy: | |
| matrix: | |
| runner: [1,2,3,4,5,6] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Debug | |
| run: | | |
| echo "Who am I: $(whoami)" | |
| echo "Hostname: $(hostname -f)" | |
| echo "Environment:" | |
| env | |
| - name: A second task | |
| run: | | |
| echo "Confirmed." |