mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-13 11:23:42 +00:00
feat: don't require docker (#16)
The only reason docker is really required by now, is that act_runner ping docker. This change only pings docker if a label with `docker://` is added to the runner. Plain labels without `:` like `self-hosted` are run directly on the system. Previously the pseudo non docker label `-self-hosted` have been required like this `self-hosted:docker://-self-hosted`, but due to docker ping this still required a dockerd to be pingable. Co-authored-by: Christopher Homberger <[email protected]> Reviewed-on: https://gitea.com/gitea/act_runner/pulls/16 Reviewed-by: Jason Song <[email protected]> Reviewed-by: Lunny Xiao <[email protected]> Co-authored-by: ChristopherHX <[email protected]> Co-committed-by: ChristopherHX <[email protected]>
This commit is contained in:
1 parent
f7a52789d9
commit
990cf93c71
5 files changed
+28
-8
No files matched your search
@@ -3,7 +3,7 @@ package cmd
|
||||
import "testing"
|
||||
|
||||
func TestValidateLabels(t *testing.T) {
|
||||
labels := []string{"ubuntu-latest:docker://node:16-buster"}
|
||||
labels := []string{"ubuntu-latest:docker://node:16-buster", "self-hosted"}
|
||||
if err := validateLabels(labels); err != nil {
|
||||
t.Errorf("validateLabels() error = %v", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user