Go to file
Kristofer f2e65e1d40
fix: Rootless error concerning `/var/run/docker.sock` (#2181)
* Use same socket defaulting strategy every time

* Always default to DOCKER_HOST

* Add more debug logs

* Commenting, and massively simplified socket logic

* Rever to upstream run_context.go

* Fix EACCESS error regarding /opt/hostedtoolcache

* Revert "Fix EACCESS error regarding /opt/hostedtoolcache"

This reverts commit b2a8394d33.

* Revert CLI debug logs

* Move socket and host handling to own function, and simplify logic

* Move to container package

* Make return be a struct

* Write tests to verify functionality

* Fix DOCKER_HOST being set to the string "DOCKER_HOST"

* Always use struct

* Use socketLocation, for DOCKER_HOST and more defaults

* Fixup arguments to GetSocketAndHost in test and root.go

* Un-struct hasDockerHost

* Fixup logic and set hasDockerHost

* Minor scoping & variable name change

* Move functionality to a new file

* Rename corresponding test

* Reviewfix

* Fix DOCKER_HOST expected

* Fix test assertions and add comments

* Swap comparison actual, expected

* Fixed no-DOCKER_HOST env test

* Fixed default socket test

* Add test to verify review comments

* Add more test for greater test coverage

* Consistent comment references

* Fix bug found while writing tests

* Passing tests

* NoMountNoHost testfix

* Rename test appropriately

* NoMount testfix

* Fixed OnlySocket

* Swap expected <-> actual in tests

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-02-06 17:18:11 +00:00
.github build(deps): bump codecov/codecov-action from 3.1.4 to 3.1.5 (#2175) 2024-01-29 02:34:33 +00:00
.vscode fix: update artifact server to address GHSL-2023-004 (#1565) 2023-01-16 21:01:54 +00:00
cmd fix: Rootless error concerning `/var/run/docker.sock` (#2181) 2024-02-06 17:18:11 +00:00
pkg fix: Rootless error concerning `/var/run/docker.sock` (#2181) 2024-02-06 17:18:11 +00:00
.actrc feat: support custom GITHUB_RUN_ID, GITHUB_RUN_NUMBER (#369) 2020-09-22 14:13:29 -07:00
.editorconfig ci(choco): update chocolatey to 1.1.0 (#1164) 2022-05-23 19:05:49 +00:00
.gitignore revert auto changelog generator 2022-06-20 17:02:49 -07:00
.gitleaksignore build(deps): bump megalinter/megalinter from 5 to 6.11.0 (#1370) 2022-10-04 22:53:18 +00:00
.golangci.yml chore: upgrade golangci-lint and address findings (#1904) 2023-07-10 17:12:12 -07:00
.goreleaser.yml Remove `archives.replacements` in `goreleaser.yaml` (#1895) 2023-07-10 17:15:16 +00:00
.markdownlint.yml ci: replace superlinter with megalinter (#923) 2021-12-22 09:29:43 -08:00
.mega-linter.yml feat: add check for newer versions (#1562) 2023-01-15 10:30:41 +00:00
.mergify.yml ci: automatic merge PRs created by a maintainer and approved by 1 other maintainer (#2156) 2024-01-19 07:04:05 -08:00
.prettierignore Update docs, file formatting and docker images (#766) 2021-08-09 09:07:26 -07:00
.prettierrc.yml Update docs, file formatting and docker images (#766) 2021-08-09 09:07:26 -07:00
CODEOWNERS Update CODEOWNERS to use 'act-maintainers' team 2021-03-29 10:22:33 -07:00
CONTRIBUTING.md Mention act user guide in act (#1973) 2023-08-17 14:43:17 +00:00
IMAGES.md fix: support docker create arguments from container.options (#1022) (#1351) 2022-10-06 22:09:43 +00:00
LICENSE Update docs, file formatting and docker images (#766) 2021-08-09 09:07:26 -07:00
Makefile Remove `archives.replacements` in `goreleaser.yaml` (#1895) 2023-07-10 17:15:16 +00:00
README.md Shrink Readme (#2198) 2024-02-06 08:22:01 -08:00
VERIFICATION Fix 132 - support for chocolatey install (#144) 2020-03-09 17:49:55 -07:00
VERSION chore: bump VERSION to 0.2.59 2024-02-01 22:32:06 +00:00
act-cli.nuspec Fix 132 - support for chocolatey install (#144) 2020-03-09 17:49:55 -07:00
codecov.yml Update docs, file formatting and docker images (#766) 2021-08-09 09:07:26 -07:00
go.mod build(deps): bump github.com/opencontainers/runc from 1.1.7 to 1.1.12 (#2187) 2024-01-31 23:56:50 +00:00
go.sum build(deps): bump github.com/opencontainers/runc from 1.1.7 to 1.1.12 (#2187) 2024-01-31 23:56:50 +00:00
install.sh fix: update install.sh (#937) 2021-12-27 16:18:30 +00:00
main.go feat: add check for newer versions (#1562) 2023-01-15 10:30:41 +00:00

README.md

act-logo

Overview push Join the chat at https://gitter.im/nektos/act Go Report Card awesome-runners

"Think globally, act locally"

Run your GitHub Actions locally! Why would you want to do this? Two reasons:

  • Fast Feedback - Rather than having to commit/push every time you want to test out the changes you are making to your .github/workflows/ files (or for any changes to embedded GitHub actions), you can use act to run the actions locally. The environment variables and filesystem are all configured to match what GitHub provides.
  • Local Task Runner - I love make. However, I also hate repeating myself. With act, you can use the GitHub Actions defined in your .github/workflows/ to replace your Makefile!

How Does It Work?

When you run act it reads in your GitHub Actions from .github/workflows/ and determines the set of actions that need to be run. It uses the Docker API to either pull or build the necessary images, as defined in your workflow files and finally determines the execution path based on the dependencies that were defined. Once it has the execution path, it then uses the Docker API to run containers for each action based on the images prepared earlier. The environment variables and filesystem are all configured to match what GitHub provides.

Let's see it in action with a sample repo!

Demo

Act User Guide

Please look at the act user guide for more documentation.

Support

Need help? Ask on Gitter!

Contributing

Want to contribute to act? Awesome! Check out the contributing guidelines to get involved.

Manually building from source

  • Install Go tools 1.20+ - (https://golang.org/doc/install)
  • Clone this repo git clone git@github.com:nektos/act.git
  • Run unit tests with make test
  • Build and install: make install