Run commands on the runner directly even if a container is used for GitHub Actions


This Content is from Stack Overflow. Question asked by testcaseone

Is there a way to use the run directly on the runner? I use a container like this:

    runs-on: ubuntu-latest
    container: debian:10-slim

      - name: Runs on container
        run: |
          ls -l

If i would want to use the ghcommand, which is installed on the runner (ubuntu-latest) by default, is there a way to use run in this context? Or do i loose all access to the runner if i choose a container?


Check the Answers

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?