Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.46 KB

selfhosted.md

File metadata and controls

37 lines (27 loc) · 1.46 KB

🏠 Run metrics on self-hosted runners

0️ Setup a self-hosted runner

Learn more about hosting runners on GitHub documentation.

⚠️ To run metrics on a self-hosted runner, the following dependencies needs to be installed on runner:

Go to repository settings, and select Runners under the Actions side tab.

Add a self-hosted runner Add a self-hosted runner

⚠️ Working user must be able to run docker. If metrics is run with an unprivileged user, ensure it can open /var/run/docker.sock

Use the following workaround when receiving the following error: dial unix /var/run/docker.sock: connect: permission denied

usermod -a -G docker $USER
chown root:docker /var/run/docker.sock

1️ Update workflows to use self-hosted runners

To run metrics action on a self-hosted runner, uses runs-on: self-hosted.

Example: render metrics for github organization

runs-on: self-hosted
steps:
  - uses: lowlighter/metrics@latest
    with:
      token: ${{ secrets.METRICS_TOKEN }}

💡 To easily debug workflow errors, use debug: yes option