question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ACTIONS_RUNNER_HOOK_JOB_COMPLETED not working

See original GitHub issue

Describe the bug I’m attempting to use the ACTIONS_RUNNER_HOOK_JOB_COMPLETED and am running into this error:

A job completed hook has been configured by the self-hosted runner administrator
[2](https://github.com/my-org/my-repo/runs/123456789?check_suite_focus=true#step:16:2)
Error: File doesn't exist

To Reproduce Steps to reproduce the behavior:

  1. Create job completed script outside of the actions-runner directory, e.g. ~/runner-job-completed.sh per this documentation.
  2. chmod 755 ~/runner-job-completed.sh
  3. Set environment variable ACTIONS_RUNNER_HOOK_JOB_COMPLETED to /Users/my-user/runner-job-completed.sh in service plist
  4. Restart runner service
  5. Run workflow
  6. See File doesn't exist error

Expected behavior File should be found and run as expected

Runner Version and Platform

Version of your runner? osx-x64-2.290.1

OS of the machine running the runner? macOS 12

What’s not working?

See above in bug description

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Nmishincommented, Mar 15, 2023

Had the same issue - fixed by:

  1. Moving the file to the different directory (according to documentation: “The custom scripts must be located on the runner, but should not be stored in the actions-runner application directory.” )
  2. Set full path to the script in the .env file, like ACTIONS_RUNNER_HOOK_JOB_COMPLETED=/opt/cleanup.sh, $PATH didn’t work here, and script will not be found even if it is there.
  3. If you using systemd for runner, restart systemd automation.service every time you change the .env file.
1reaction
nikola-jokiccommented, Apr 26, 2022

Hi @dan-stytch,

Thank you for submitting this issue! We will get back to you as soon as we reproduce it and find the root cause of this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub Actions: Job management hooks for self-hosted ...
GitHub Actions: Job management hooks for self-hosted runners ... the runner starts running a job from a workflow, and after a job completes....
Read more >
Error "Waiting for a runner to pick up this job" using GitHub ...
When I use GitHub Actions with my config, there is a long waiting and it shows "Waiting for a runner to pick up...
Read more >
Managing Kubernetes Resources Using Helm: Simplifying how to ...
A hook executes as a one-time action at a designated point in time during the ... for running bare pods, it is preferred...
Read more >
Decisions and Orders of the National Labor Relations Board
Wiseman respected Bradley's competence , the two did not get along professionally . ... Bradley was assigned by Wiseman the job of running...
Read more >
Employment Security Review
However , that was not as great a stumbling block as might at first be surmised ... can work at some type of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found