This repository is a playground for working with minikube and GitHub actions. All actions are executed inside codespace that runs self-hosted agent that is launched on codespaces startup together with minikube.
- In Settings > Developer settings
- create
personal access token (classic)
withrepo
scope
- create
- In Settings > Codespaces
- create
Codespaces secrets
namedPAT
- bind it to this repository
- create
- In repository Settings > Actions > Runners
- Verify that self-hosted runner is in
Active
orIdle
state
- Verify that self-hosted runner is in
kubectl apply -f devops/k8s/manifests
kubectl port-forward service/nginx 8080:80
-
Test Connectivity
GH_ACTION_DIR=/usr/src/actions-runner SELF_HOSTED_RUNNER_PAT_TOKEN=$(curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $PAT_TOKEN" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/$GITHUB_REPOSITORY/actions/runners/registration-token | jq --raw-output .token) $GH_ACTION_DIR/run.sh --check --url https://github.com/$GITHUB_REPOSITORY --pat $SELF_HOSTED_RUNNER_PAT_TOKEN
-
Remove Runner
$GH_ACTION_DIR/config.sh remove --token $SELF_HOSTED_RUNNER_PAT_TOKEN
start a background server process in a job github self hosted runner