1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-11 17:50:58 +00:00
Commit graph

32 commits

Author SHA1 Message Date
Markus Wolf
16c81e63ff Add custom docker registry authentication (#665)
* Add custom docker registry authentication

Uses DOCKER_USERNAME and DOCKER_PASSWORD as secrets provided into
the act cli.

Closes #527

Co-authored-by: Björn Brauer <zaubernerd@zaubernerd.de>

* Add test to check if pull authentication is filled in

* Update debug message to be more descriptive

Co-authored-by: Ryan (hackercat) <me@hackerc.at>

Co-authored-by: Björn Brauer <zaubernerd@zaubernerd.de>
Co-authored-by: Ryan (hackercat) <me@hackerc.at>
2021-05-05 09:37:17 -07:00
Ryan (hackercat)
69b692b962 Add super-linter + fix lint issues (#650)
* feat: bump `golangci-lint`, add `super-linter`, replace outdated linter

Bump `golangci-lint` version.
Add `super-linter` to lint other languages.
Go linter is disabled because it's currently broken:
https://github.com/github/super-linter/pull/370
Replacing `scopelint` with `exportloopref`: "[runner] The linter
'scopelint' is deprecated (since v1.39.0) due to: The repository of the
linter has been deprecated by the owner.  Replaced by exportloopref."
Fixed formatting in `.golangci.yml`
Add addtional linters:
  `misspell`: purely style, detects typos in comments
  `whitespace`: detects leading and trailing whitespace
  `goimports`: it's gofmt + checks unused imports

* fix: lint/fix `go` files

* fix: lint with `standardjs`

* fix: lint/fix with `markdownlint`, make template more verbose

* feat: add lint stuff to makefile

* fix: `UseGitIgnore` formatting

* fix: lint/fix `README.md`

Co-authored-by: Casey Lee <cplee@nektos.com>
2021-05-03 09:52:03 -07:00
Ryan (hackercat)
cf202bedb5 Add option to allow files/directories in .gitignore to be copied to container (#537)
* disable gitignore for actions

* feat: Add option to allow/disallow paths specified in .gitignore

Co-authored-by: Alan Birtles <alan.birtles@eu.sony.com>
2021-05-03 07:37:20 -07:00
Ryan (hackercat)
2f37fc728b fix: reworked container architecture (#619)
- Don't set architecture, let Docker host decide it's own platform,
  remove `runtime` dependency and don't show default in `--help`
- Remove most tests, we need to check only once if it works on
  different platform
- Rename `DeleteImage` to `RemoveImage` to conform to existing
  function in `docker` cli, added options to specify `force` and
  `pruneChildren`
2021-05-02 08:15:13 -07:00
Jay Pipes
6d023b011e use container image platform only on docker 1.41+ (#591)
Commit fef399d057 introduced support for
specifying a container image platform for cross-platform image building.

Unfortunately, attempting to execute a docker command that includes the
`--platform` flag against Docker daemons using API Version 1.40 and
before results in the following error:

```
"specify container image platform" requires API version 1.41, but the Docker daemon API version is 1.40
```

To allow `act` to be used on the 19.03 Docker CE and earlier versions,
this patch simply checks the Docker daemon API version and only
specifies platform specification when the daemon API version is 1.41 or
greater.

Fixes Issue #586
2021-03-30 10:10:42 -07:00
hackercat
391acea9e2 Add option to run custom architecture (container platform) (#525)
* Add QEMU to run different architectures

* Update dependencies in `go.mod`

* Add `--container-architecture` flag to specify custom image architecture

Co-authored-by: Casey Lee <cplee@nektos.com>
2021-03-28 21:08:40 -07:00
Hibariya
fa4c3c59cb Add --userns flag to support Docker daemon that enables user namespace (#533)
I got an error like this after hitting `act` command.

> Error: Error response from daemon: cannot share the host's network namespace when user namespaces are enabled

According to the document, when user namespaces are enabled on the Docker daemon,
neither host network mode and --privileged work without --userns=host. Since `act`
uses host network mode to match GitHub Actions runners, it cannot run jobs when
user namespaces are enabled. So I added the flag.

https://docs.docker.com/engine/security/userns-remap/#user-namespace-known-limitations

Co-authored-by: Casey Lee <cplee@nektos.com>
2021-02-27 08:31:25 -08:00
KADOTA, Kyohei
035108c9f1 Format sources with gofmt (#472)
Co-authored-by: Casey Lee <cplee@nektos.com>
2021-01-14 21:37:38 -08:00
Cat™
9cb63f0bd6 Fix slashes when running on Windows (#461) 2021-01-11 22:41:35 -08:00
Torbjørn Vatn
b60851b818 GitHub env file support (#426)
* Upgrade to the official golangci-lint action and fix some issues it found

* Update deps

* Remove a shadow warning

* Initialize the splitPattern only once

* Initial attempt at supporting $GITHUB_ENV

Needs some polishing and tests

* Now it's actually working

* Replace golang.org/x/crypto/ssh/terminal with golang.org/x/term

* Disable the issue-228 test again

* The linter is picky

* Discovered that the workflow/envs.txt had to exist in certain cases

* Fix small linter issue
2021-01-11 22:39:43 -08:00
Lyle Underwood
d36a3f80c7 Remove confusing message about symlinks (#381) 2020-10-06 10:02:37 -07:00
Bar Weiss
4e7bcf23b6 Fix copyDir to normalize file paths in tar archive (#360) 2020-09-15 07:00:15 -07:00
whywaita
4d237924ac add flag of privileged mode 2020-08-02 05:21:49 +09:00
Josh Soref
72c3bf2220 Spelling (#240)
* spelling: cartesian

* spelling: deferring

* spelling: marshal
2020-05-18 09:53:42 -07:00
Sven Dowideit
dea1ed5769 extract the docker NewClientWithOpts, and add connectionhelper for DOCKER_HOST set to ssh://remote (#207)
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>

Co-authored-by: Casey Lee <cplee@nektos.com>
2020-05-03 21:15:42 -07:00
Casey Lee
8611e2a3d2 fix: ignore symlink errors 2020-04-22 23:48:25 -07:00
Casey Lee
9253d2102c fix: #182 - support symlinks in workspace 2020-04-22 23:24:31 -07:00
Máximo Cuadros
5e7ec329bd *: update go-git import (#194) 2020-04-16 16:24:30 -07:00
Aidan Steele
249ebdb066 Improved gitignore handling (#163) 2020-03-18 06:55:39 -07:00
Casey Lee
41dabfd633 add file info to files cp into container 2020-03-13 23:21:25 -07:00
Casey Lee
96f6ad0f43 fix #50 - exclude anything in .gitignore from being copied into the job volume 2020-03-09 18:32:48 -07:00
Casey Lee
e60c46b79f fix #122 - support actions/checkout for repos other the one for this workflow (#143) 2020-03-09 17:45:42 -07:00
Casey Lee
caba9f7645 fix #141 - use host network to match GitHub Actions runners (#142) 2020-03-09 17:43:24 -07:00
Casey Lee
fbecf70cc2 remove super verbose log statement 2020-02-24 17:58:34 -08:00
Casey Lee
199c125522 run with copy of workingdir 2020-02-24 17:48:21 -08:00
Casey Lee
6df3e39a46 move action cache to volume 2020-02-24 16:38:49 -08:00
Casey Lee
0f6340f811 cache dir for remote actions 2020-02-23 22:34:48 -08:00
Casey Lee
e5680477f9 local actions done 2020-02-23 16:36:44 -08:00
Casey Lee
12ac7300b9 shared container for job 2020-02-23 15:01:25 -08:00
Casey Lee
c44aa2a118 cleanup logging
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:40 -05:00
Casey Lee
33f8290eb3 successfully able to run simple workflows
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:25 -05:00
Casey Lee
fbab49c68d initial load of yaml working 2020-02-04 16:38:41 -08:00
Renamed from container/docker_run.go (Browse further)