Skip to content

Commit

Permalink
Go back using root
Browse files Browse the repository at this point in the history
  • Loading branch information
Smjert committed Jul 5, 2024
1 parent 1ba630e commit b82900e
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/self_hosted_runners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ jobs:

container:
image: osquery/builder20.04:7e9ee0339
options: --privileged --init -v /var/run/docker.sock:/var/run/docker.sock --pid=host --user 1001
options: --privileged --init -v /var/run/docker.sock:/var/run/docker.sock --pid=host --user root

strategy:
matrix:
Expand All @@ -207,15 +207,7 @@ jobs:
- name: Setup the build paths
id: build_paths
run: |
# The self hosted runner host user is root, differently from hosted runners,
# so we need to change permissions of the workspace folders to the current user
sudo chown -R runner:runner /__w
ls -ld /__w
ls -ld /__w/_temp
ls -ld /__w/_temp/_runner_file_commands
# Also, the group for the docker socket doesn't have gid docker
# The group for the docker socket doesn't have gid docker
sudo chown root:docker /var/run/docker.sock
rel_build_path="workspace/usr/src/debug/osquery/build"
Expand Down Expand Up @@ -350,7 +342,7 @@ jobs:
- name: Run the tests as normal user
working-directory: ${{ steps.build_paths.outputs.BINARY }}
run: |
ctest --build-nocmake -LE "root-required" -V
sudo -u runner ctest --build-nocmake -LE "root-required" -V
- name: Run the tests as root user
working-directory: ${{ steps.build_paths.outputs.BINARY }}
Expand Down

0 comments on commit b82900e

Please sign in to comment.