Skip to content

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)

ilciko added 3 commits April 9, 2023 11:28
 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