Questions tagged [github-actions-self-hosted-runners]

Use this tag when asking questions specific to self-hosted runners for GitHub Actions.

GitHub Actions offers the option to self-host your runners instead of using the cloud-based runners provided by GitHub. Using a self-hosted runner provides more control about the runner's configuration.

124 questions
12
votes
1 answer

Running a job on every runner in GitHub Actions

For those that are familiar with Github Actions... At present, when a job runs, it picks the most suitable runner for the job based on labels and repository (Using self-hosted runners in a workflow - GitHub Docs). My question is whether it is…
11
votes
2 answers

Self hosted environment variables not available to Github actions

When running Github actions on a self hosted runner machine, how do I access existing custom environment variables that have been set on the machine, in my Github action .yaml script? I have set those variables and restarted the runner virtual…
10
votes
6 answers

Can't install GitHub actions runner on linux

I'm trying to install a GitHub runner on my Linux machine (Ubuntu 20.04.1 LTS) following the steps described at repo>settings>Actions>add runner. The first steps worked fine but when I run the config: ./config.sh --url --token I…
7
votes
2 answers

Error: RROR] Process or Namespace not found. PM2 Error Linux Server with github actions

I recently updated my self-hosted linux server on compute engine. Pm2 had been working perfectly along my github actions previously. However after update when i restart a pm2 instance from my ssh terminal it works fine. But when I try to restart pm2…
5
votes
1 answer

In a GitHub Actions workflow, how can you determine the Organziation where the current repository is housed?

I'm trying to organize my workflow artifacts (on a self-hosted runner) using a structure similar to this: c:\github\artifacts\{org}\{repo}\{runid} Different organizations in our enterprise COULD have a repository with the same name, so I wanted to…
bperniciaro
  • 901
  • 2
  • 12
  • 30
5
votes
1 answer

github runner on Windows not finding executables on PowerShell

I am trying to use a self-hosted Windows-VM to run west for repo management, python to run some scripts, and git to push back to the repo. The work is to generate files using python from repo-A as artifacts to check-into repo-B. I had to use Windows…
4
votes
2 answers

How to Dynamically assign the runs-on value in the github actions

name: test if conditions name: test if conditions on: push: branches: [master, test] env: TEST_BRANCH: "test" EMPTY_VALUE: "" jobs: test-conditions: runs-on: ubuntu-latest steps: - name: simple evaluation on test …
4
votes
1 answer

GitHub Action Error: Docker pull failed with exit code 1

I'm trying to run my npm build inside the docker container using our private docker image with GitHub actions. My Workflow yaml file as follows, jobs: build: runs-on: Linux-self-hosted # This is our self hosted linux runner system. …
user4948798
  • 1,924
  • 4
  • 43
  • 89
4
votes
3 answers

Github actions self-hosted runner - The job running has exceeded the maximum execution time of 360 minutes

I'm running a DAST scanner via github actions and it has failed due to timeout because the job took longer than 6 hours. Reading through the documentation I see the limit should not be applied to self hosted runners, and there is no entry for job…
4
votes
0 answers

How to swap users in Linux through GitHub workflow?

I'm having Github workflow to run a python file. Before running the python file I want to swap user so that no sudo is required to execute the python file. I tried with 'su' but it's says su must be run from command line. How to do that through…
4
votes
2 answers

Self Hosted Runner for each branch prod and dev

I have 2 branches prod and dev and I need to create a self-hosted runner for each so that I can use GitHub actions to auto-deploy the branches to the respective server. I already made the YAML file for actions on both branches that are different and…
3
votes
0 answers

'Unable to Find User ContainerUser' when building Windows Dockerfile via Actions Runner

When building my windows dockerfile (.net core nano)... docker build -f *** -t ***:*** --build-arg ARG1=foo --build-arg ARG2=bar . I'm getting an error during the build that occurs in response to my first RUN command. The command will fail with the…
3
votes
2 answers

Cannot update GITHUB_PATH on self-hosted windows github action-runner

I have following workflow name: Test set path on: workflow_dispatch: jobs: test-cross-aws: runs-on: [self-hosted, '${{ matrix.platform.os }}', x64, '${{ matrix.platform.label }}'] #runs-on: windows-latest strategy: matrix: …
AlexS
  • 927
  • 4
  • 16
  • 29
3
votes
3 answers

$GITHUB_OUTPUT - Directory nonexistent (Self hosted runner)

I'm trying to use $GITHUB_OUTPUT instead of set-output. I set up a simple GitHub Action with a docker file based on the official tutorial. # Container image that runs your code FROM alpine:latest # Copies your code file from your action repository…
3
votes
1 answer

Specify runner to be used depending on condition in a GitHub Actions workflow

We have two runners, one for running production jobs and another for running non production jobs, but I am unable to do that using a workflow level environment variable. Below is what I have: name: Workflow file on: workflow-dispatch env: …
1
2 3
8 9