Skip to content

Siddhant-K-code/gce-github-runner

 
 

Repository files navigation

gce-github-runner

Ephemeral GCE GitHub self-hosted runner based on https://github.com/related-sciences/gce-github-runner

For more context see Running Github runners in GCE VMs

Usage

jobs:
  create-runner:
    uses: gitpod-io/gce-github-runner/.github/workflows/create-vm.yml@secrets
    secrets:
      runner_token: ${{ secrets.GH_SA_TOKEN }}
      gcp_credentials: ${{ secrets.GCP_SA_KEY }}

  test:
    needs: [create-runner]
    runs-on: ${{ needs.create-runner.outputs.label }}
    steps:
      - run: echo "This runs on the GCE VM"

  delete-runner:
    if: always()
    needs:
      - create-runner
      - test
    uses: gitpod-io/gce-github-runner/.github/workflows/delete-vm.yml@secrets
    secrets:
      gcp_credentials: ${{ secrets.GCP_SA_KEY }}
    with:
      runner-label: ${{ needs.create-runner.outputs.label }}
      machine-zone: ${{ needs.create-runner.outputs.machine-zone }}
  • create-runner creates the GCE VM and registers the runner with unique label
  • test uses the runner
  • delete-runner waits for the end of the steps execution and then shutdowns the GCE VM, removing the runner from the GitHub runner

Inputs

See inputs and descriptions here.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 82.4%
  • Dockerfile 7.5%
  • HCL 6.2%
  • Makefile 3.9%