-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More support for local action runner act (#30615)
- add .actrc with detailed comments decisions for defaults: - use bind mount rather than docker cp for speed (requires cleaning environment and action addition) - remove containers and volumes after finishing - those can quickly build up to big sizes - add action that sets git's safe directory to * for act runs git started checking if user running git and user owning repo are the same github requires containers to run as root user act doing docker cp takes long time but bind is quick, yet we get fperm issues as most people dont have root owned repo Signed-off-by: Alexander Mazuruk <[email protected]>
- Loading branch information
1 parent
c37c1ec
commit 1590178
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
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,27 @@ | ||
# This file contains settings for local github action runner act: | ||
# https://github.com/nektos/act | ||
# | ||
# It is recommended to run specific jobs that you need, all jobs except those | ||
# running on should darwin work. | ||
# e.g. act -j build_linux | ||
# | ||
# It is recommended to set up a separate bridge network | ||
# and possibly define it in ~/.actrc like so: | ||
# --network=bridge | ||
# https://docs.docker.com/network/drivers/bridge/ | ||
|
||
# Remove containers after finishing a job, comment out for debugging | ||
--rm | ||
|
||
# Reuse the checkout from host, otherwise act will do docker cp that makes | ||
# running jobs a lot longer even on SSD. Clean up your .environment before | ||
# running it. | ||
--bind | ||
|
||
# Easier to have 1:1 match between triggering jobs and reading logs when they | ||
# use the same name | ||
--log-prefix-job-id | ||
|
||
# Default runner image does not include enough. | ||
# https://github.com/nektos/act#default-runners-are-intentionally-incomplete | ||
-P ubuntu-latest=catthehacker/ubuntu:full-latest |
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
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,9 @@ | ||
name: Git safe directory | ||
description: For running act with checkout owned by non-root user | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set git safe.directory to "*" | ||
if: ${{ env.ACT }} | ||
shell: bash | ||
run: git config --system --add safe.directory '*' |