julia-actions / cache

A shortcut action to cache Julia artifacts, packages, and registries.
MIT License
38 stars 8 forks source link

Can't find handle_caches.jl in post step #77

Closed cjproud closed 9 months ago

cjproud commented 9 months ago

With the recent v1.4 release, my workflow that includes this action has broken with this error at the Post Cache Julia step:

Post job cleanup.
Post job cleanup.
/usr/bin/docker exec  e11ee2023a2a40c471adf0aa339aa7bbb9ebb1b339140991e6729d4a4503f510 sh -c "cat /etc/*release | grep ^ID"
ERROR: SystemError: opening file "/home/ubuntu/actions-runner/_work/_actions/julia-actions/cache/v1/handle_caches.jl": No such file or directory

This action is running within a container built using an Ubuntu image on a self-hosted runner. I have a feeling that this issue is related to https://github.com/actions/runner/issues/716, where the ${{ github.action_path }} context variable points towards the incorrect action path. In this case, it's pointing towards the action path on the host that is mounted in the container rather than it's mount point within the container. Mount points are shown below from docker inspect:

    "HostConfig": {
        "Binds": [
            "/home/ubuntu/actions-runner/_work/_temp/_github_home:/github/home",
            "/home/ubuntu/actions-runner/_work/_temp/_github_workflow:/github/workflow",
            "/var/run/docker.sock:/var/run/docker.sock",
            "/home/ubuntu/actions-runner/externals:/__e:ro",
            "/home/ubuntu/actions-runner/_work/_temp:/__w/_temp",
            "/home/ubuntu/actions-runner/_work/_actions:/__w/_actions",
            "tmp_volume:/tmp_volume",
            "/home/ubuntu/actions-runner/_work:/__w",
            "/home/ubuntu/actions-runner/_work/_tool:/__w/_tool"
        ],

I'll make a PR (#78) to fix this as it appears you can use the GITHUB_ACTION_PATH env variable to give the correct path rather than the context variable.

cjproud commented 9 months ago

PR #78 added 👍

IanButterworth commented 9 months ago

Closed by https://github.com/julia-actions/cache/pull/78