Last active
January 6, 2023 15:52
-
-
Save kirmorozov/0c40981ea453549066baa8e6bda81b21 to your computer and use it in GitHub Desktop.
macOS Github actions service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>loc.run.github-actions-agent</string> | |
<key>WorkingDirectory</key> | |
<string>{WORKING_DIRECTORY}</string> | |
<key>EnvironmentVariables</key> | |
<dict> | |
<key>PATH</key> | |
<string>/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string> | |
</dict> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/bin/sh</string> | |
<string>run.sh</string> | |
</array> | |
<key>StandardOutPath</key> | |
<string>/tmp/gh-agent.stdout</string> | |
<key>StandardErrorPath</key> | |
<string>/tmp/gh-agent.stderr</string> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>KeepAlive</key> | |
<true/> | |
</dict> | |
</plist> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install github agent | |
# | |
curl -o loc.run.github-actions-agent.plist https://gist.githubusercontent.com/kirmorozov/0c40981ea453549066baa8e6bda81b21/raw/59c5e0d081df699b58b0dbbe4501a0352f6d0ca3/loc.run.github-actions-agent.plist | |
cat loc.run.github-actions-agent.plist | sed "s#{WORKING_DIRECTORY}#$PWD#g" > ~/Library/LaunchAgents/loc.run.github-actions-agent.plist | |
# insert and save values {WORKING_DIRECTORY} | |
launchctl load ~/Library/LaunchAgents/loc.run.github-actions-agent.plist | |
launchctl start loc.run.github-actions-agent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment