Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to run action on self-hosted runner #90

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ilciko
Copy link

@ilciko ilciko commented Apr 9, 2023

Use GITHUB_ACTION_PATH instead of github.action_path for Docker compliance
Add in README.md instruction to run on self-hosted container (missing packages)

 Use GITHUB_ACTION_PATH instead of github.action_path for Docker compliance
Run Spellcheck in self-hosted runner
Add support for Docker images
Copy link
Owner

@ludeeus ludeeus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split this into 2 PRs and provide documentation from GitHub that describes why it's needed.

@ludeeus ludeeus marked this pull request as draft April 9, 2023 09:52
@ilciko
Copy link
Author

ilciko commented Apr 10, 2023

Hello,
when action run on self-hosted server using container, actions MP is exposed as:
-v "/home/rocky/actions-runner/_work/_actions":"/__w/_actions"

docker.io/library/rockylinux:8
  /usr/bin/docker create [omissis] -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/rocky/actions-runner/_work":"/__w" -v "/home/rocky/actions-runner/externals":"/__e":ro -v "/home/rocky/actions-runner/_work/_temp":"/__w/_temp" -v "/home/rocky/actions-runner/_work/_actions":"/__w/_actions" -v "/home/rocky/actions-runner/_work/_tool":"/__w/_tool" -v "/home/rocky/actions-runner/_work/_temp/_github_home":"/github/home" -v "/home/rocky/actions-runner/_work/_temp/_github_workflow":"/github/workflow" --entrypoint "tail" rockylinux:8 "-f" "/dev/null"

From debug you can see that:
"${{ github.action_path }}" == /home/rocky/actions-runner/_work/_actions/ilciko/action-shellcheck/
"${GITHUB_ACTION_PATH}" == /__w/_actions/ilciko/action-shellcheck/

the value of ${{ github.action_path }} point at /home/rocky/actions-runner/_work/_actions, that's not present inside a container.
Instead the value ${GITHUB_ACTION_PATH} point at right place in both cases (github cloud instance and docker on self-hosted too)

Here a discussion about this problem:
actions/runner#716

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants