-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate the configuration for self-hosted runners into privileged an…
…d unprivileged
- Loading branch information
Showing
7 changed files
with
69 additions
and
17 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
LANG=en_US.UTF-8 | ||
|
||
ACTIONS_RUNNER_HOOK_JOB_STARTED=/home/manager/actions-runner-hooks/job-started.sh | ||
ACTIONS_RUNNER_HOOK_JOB_COMPLETED=/home/manager/actions-runner-hooks/job-completed.sh |
18 changes: 18 additions & 0 deletions
18
.github/runners/self-hosted/unprivileged/actions-runner-hooks/job-completed.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# cleanup the workspace | ||
if [ -n "${GITHUB_WORKSPACE}" ]; then | ||
if pushd "${GITHUB_WORKSPACE}"; then | ||
echo "Cleaning up..." | ||
find ! -name '.' ! -name '..' -delete | ||
echo "...cleanup complete" | ||
|
||
popd | ||
else | ||
echo "ERROR: Failed to pushd to '${GITHUB_WORKSPACE}'" | ||
exit 1 | ||
fi | ||
else | ||
echo "ERROR: GITHUB_WORKSPACE is not defined" | ||
exit 1 | ||
fi |
18 changes: 18 additions & 0 deletions
18
.github/runners/self-hosted/unprivileged/actions-runner-hooks/job-started.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# cleanup the workspace | ||
if [ -n "${GITHUB_WORKSPACE}" ]; then | ||
if pushd "${GITHUB_WORKSPACE}"; then | ||
echo "Cleaning up..." | ||
find ! -name '.' ! -name '..' -delete | ||
echo "...cleanup complete" | ||
|
||
popd | ||
else | ||
echo "ERROR: Failed to pushd to '${GITHUB_WORKSPACE}'" | ||
exit 1 | ||
fi | ||
else | ||
echo "ERROR: GITHUB_WORKSPACE is not defined" | ||
exit 1 | ||
fi |
This file contains 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