Jason Song
24348ff1ee
Drop disappeared wei/curl@v1 ( #1864 )
...
* chore: trigger actions
* fix: use curl command directly
* fix: use node:16-buster
* fix: remove --fail-with-body
* chore: format codes
2023-06-13 21:24:31 +00:00
Tomasz Duda
946c41cf4f
Improve run.sh to handle empty labels and log to stdout ( #237 )
...
1. Print logs on standard output
2. Don't add labels if GITEA_RUNNER_LABELS not set
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/237
Reviewed-by: Jason Song <i@wolfogre.com >
Co-authored-by: Tomasz Duda <tomaszduda23@gmail.com >
Co-committed-by: Tomasz Duda <tomaszduda23@gmail.com >
2023-06-13 04:09:11 +00:00
ccureau
341d49a24d
implement act_runner rootless image ( #208 )
...
This PR creates a rootless Docker image that runs both `dockerd` and `act_runner` using `supervisord`. It has been tested locally for a few days and seems stable.
Co-authored-by: ccureau <ccureau@noreply.gitea.io >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/208
Reviewed-by: Jason Song <i@wolfogre.com >
Co-authored-by: ccureau <ccureau@noreply.gitea.com >
Co-committed-by: ccureau <ccureau@noreply.gitea.com >
2023-06-12 06:35:27 +00:00
dependabot[bot]
b92d95f899
build(deps): bump github.com/moby/buildkit from 0.11.5 to 0.11.6 ( #1858 )
...
Bumps [github.com/moby/buildkit](https://github.com/moby/buildkit ) from 0.11.5 to 0.11.6.
- [Release notes](https://github.com/moby/buildkit/releases )
- [Commits](https://github.com/moby/buildkit/compare/v0.11.5...v0.11.6 )
---
updated-dependencies:
- dependency-name: github.com/moby/buildkit
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-06-12 04:28:49 +00:00
dependabot[bot]
3555d65d08
build(deps): bump megalinter/megalinter from 7.0.4 to 7.1.0 ( #1857 )
...
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter ) from 7.0.4 to 7.1.0.
- [Release notes](https://github.com/megalinter/megalinter/releases )
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md )
- [Commits](https://github.com/megalinter/megalinter/compare/v7.0.4...v7.1.0 )
---
updated-dependencies:
- dependency-name: megalinter/megalinter
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-06-12 03:33:28 +00:00
dependabot[bot]
e912ab32c2
build(deps): bump github.com/mattn/go-isatty from 0.0.18 to 0.0.19 ( #1859 )
...
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty ) from 0.0.18 to 0.0.19.
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.18...v0.0.19 )
---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 03:13:51 +00:00
Troy Gaines
80f6de51d5
fix: spelling mistake in readme ( #1854 )
...
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-06-10 18:42:54 +00:00
Kuan Yong
6ce45e3f24
feature: Add support for github action variables ( #1833 )
...
* feature: Add support for github action variables
* add --var flag for github variables
* unitests: Updated unittests to cover vars context.
* Remove syntax extension for vars and correct unit tests
* Update pkg/runner/expression.go
Co-authored-by: ChristopherHX <christopher.homberger@web.de >
---------
Co-authored-by: kuanyong-wong-partior <kuanyong.wong@partior.com >
Co-authored-by: ChristopherHX <christopher.homberger@web.de >
2023-06-10 18:09:27 +00:00
MarkusLoeffler01
b21d476aca
Exit with Code 1 if registering a runner fails ( #228 )
...
### It's a "simple dirty fix" and I don't have any experiences with Go, so if this doesn't match your coding compliance, please adjust the code as needed
I'm using bash scripts to register a token
`./act_runner/act_runner register --no-interactive --name runner$number --instance http://localhost:3000 --token $token`
But when a token is invalid, the command still returns 0, which is not practical for automation.
A simple non-zero return would be more convenient for power users and developers.
Co-authored-by: Markus Löffler <markus.loeffler@netcare.de >
Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/228
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com >
Co-authored-by: MarkusLoeffler01 <markusloeffler01@noreply.gitea.com >
Co-committed-by: MarkusLoeffler01 <markusloeffler01@noreply.gitea.com >
2023-06-09 17:34:23 +00:00
Jason Song
a29307a9d9
Remove hadolint and improve Dockerfile ( #234 )
...
Replace #190
See:
- https://gitea.com/gitea/act_runner/pulls/190#issuecomment-741196
- https://gitea.com/gitea/act_runner/pulls/208#issuecomment-741049
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/234
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-by: silverwind <silverwind@noreply.gitea.com >
Reviewed-by: delvh <dev.lh@web.de >
2023-06-09 02:50:30 +00:00
a1012112796
4bfbfec477
fix defaultActionsUrls config for exec ( #233 )
...
follow #200
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/233
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-by: Jason Song <i@wolfogre.com >
Co-authored-by: a1012112796 <1012112796@qq.com >
Co-committed-by: a1012112796 <1012112796@qq.com >
2023-06-08 04:26:52 +00:00
Zettat123
fed01c9807
Parse multiple default actions URLs ( #200 )
...
Follow https://gitea.com/gitea/act/pulls/58
Resolve https://github.com/go-gitea/gitea/issues/24789
Co-authored-by: Jason Song <i@wolfogre.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/200
Reviewed-by: Jason Song <i@wolfogre.com >
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Zettat123 <zettat123@gmail.com >
Co-committed-by: Zettat123 <zettat123@gmail.com >
2023-06-06 04:03:02 +00:00
psa
3ac2b726f2
Fix bug in processing jobs on platforms without Docker ( #1834 )
...
* Log incoming jobs.
Log the full contents of the job protobuf to make debugging jobs easier
* Ensure that the parallel executor always uses at least one thread.
The caller may mis-calculate the number of CPUs as zero, in which case
ensure that at least one thread is spawned.
* Use runtime.NumCPU for CPU counts.
For hosts without docker, GetHostInfo() returns a blank struct which
has zero CPUs and causes downstream trouble.
---------
Co-authored-by: Paul Armstrong <psa@users.noreply.gitea.com >
Co-authored-by: Jason Song <i@wolfogre.com >
2023-06-06 03:00:54 +00:00
Bo-Yi Wu
a83f29d5a9
docs: improve examples README and organization ( #230 )
...
- Update the introduction and descriptions in the examples README
- Add a table with descriptions for each section (docker, docker-compose, kubernetes, vm)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/230
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com >
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com >
Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2023-06-06 02:42:58 +00:00
Bo-Yi Wu
69c55ee003
refactor: daemon, config, and logging for better clarity ( #225 )
...
- Import "path", "runtime", "strconv", and "strings" packages in daemon.go
- Move "Starting runner daemon" log message to a different location
- Refactor log formatter initialization and add debug level caller information
- Split Config struct into separate Log, Runner, Cache, and Container structs with comments in config.go
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/225
Reviewed-by: Jason Song <i@wolfogre.com >
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com >
Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com >
2023-06-05 13:11:23 +00:00
a1012112796
01ef57c667
fix artifactServerPath and artifactServerAddr config for exec ( #221 )
...
fix exec logic to make `actions/download-artifact` and `actions/upload-artifact` can be used.
example result:
```YML
name: test-artifact
on:
- push
- pull_request
jobs:
test-artifact-1:
name: test 1
runs-on: ubuntu-latest
steps:
- run: echo `date` | tee time.txt
- name: cache build result
uses: actions/upload-artifact@v3
with:
name: build-artifact
path: time.txt
retention-days: 1
test-artifact-2:
name: test 2
needs: test-artifact-1
runs-on: ubuntu-latest
steps:
- name: Retrieve saved build result
uses: actions/download-artifact@v3
with:
name: build-artifact
path: .
- run: ls -lh
- run: cat time.txt
```

Co-authored-by: Jason Song <i@wolfogre.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/221
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: a1012112796 <1012112796@qq.com >
Co-committed-by: a1012112796 <1012112796@qq.com >
2023-06-05 08:51:44 +00:00
Chris Cureau
a384adbbc6
Documentation enhancements ( #207 )
...
This PR addresses the issue listed in issue #170 regarding how to set up rootless Docker. It also expands on the documentation to show how to create deployments for different environments.
Co-authored-by: ccureau <ccureau@noreply.gitea.io >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/207
Reviewed-by: Jason Song <i@wolfogre.com >
Co-authored-by: Chris Cureau <cmcureau@gmail.com >
Co-committed-by: Chris Cureau <cmcureau@gmail.com >
2023-06-05 08:46:15 +00:00
dependabot[bot]
c70a6743f6
build(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.4 ( #1842 )
...
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify ) from 1.8.2 to 1.8.4.
- [Release notes](https://github.com/stretchr/testify/releases )
- [Commits](https://github.com/stretchr/testify/compare/v1.8.2...v1.8.4 )
---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-06-05 04:46:40 +00:00
dependabot[bot]
04b5c739d2
build(deps): bump megalinter/megalinter from 7.0.2 to 7.0.4 ( #1838 )
...
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter ) from 7.0.2 to 7.0.4.
- [Release notes](https://github.com/megalinter/megalinter/releases )
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md )
- [Commits](https://github.com/megalinter/megalinter/compare/v7.0.2...v7.0.4 )
---
updated-dependencies:
- dependency-name: megalinter/megalinter
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-06-05 04:27:58 +00:00
dependabot[bot]
e48c07988e
build(deps): bump github.com/docker/cli ( #1843 )
...
Bumps [github.com/docker/cli](https://github.com/docker/cli ) from 24.0.1+incompatible to 24.0.2+incompatible.
- [Commits](https://github.com/docker/cli/compare/v24.0.1...v24.0.2 )
---
updated-dependencies:
- dependency-name: github.com/docker/cli
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-06-05 04:06:57 +00:00
dependabot[bot]
0b05ee8e0b
build(deps): bump github.com/imdario/mergo from 0.3.15 to 0.3.16 ( #1840 )
...
Bumps [github.com/imdario/mergo](https://github.com/imdario/mergo ) from 0.3.15 to 0.3.16.
- [Release notes](https://github.com/imdario/mergo/releases )
- [Commits](https://github.com/imdario/mergo/compare/v0.3.15...v0.3.16 )
---
updated-dependencies:
- dependency-name: github.com/imdario/mergo
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-06-05 03:51:00 +00:00
dependabot[bot]
e150310da7
build(deps): bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3 ( #1841 )
...
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus ) from 1.9.2 to 1.9.3.
- [Release notes](https://github.com/sirupsen/logrus/releases )
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md )
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.2...v1.9.3 )
---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-06-05 03:35:57 +00:00
dependabot[bot]
34db86138b
build(deps): bump golangci/golangci-lint-action from 3.4.0 to 3.5.0 ( #1839 )
...
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action ) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases )
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.4.0...v3.5.0 )
---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 03:13:17 +00:00
GitHub Actions
b0d0cec71f
chore: bump VERSION to 0.2.46
2023-06-01 02:39:05 +00:00
dependabot[bot]
26f1b1f4b6
build(deps): bump github.com/opencontainers/image-spec ( #1829 )
...
Bumps [github.com/opencontainers/image-spec](https://github.com/opencontainers/image-spec ) from 1.1.0-rc2.0.20221005185240-3a7f492d3f1b to 1.1.0-rc.3.
- [Release notes](https://github.com/opencontainers/image-spec/releases )
- [Changelog](https://github.com/opencontainers/image-spec/blob/main/RELEASES.md )
- [Commits](https://github.com/opencontainers/image-spec/commits/v1.1.0-rc3 )
---
updated-dependencies:
- dependency-name: github.com/opencontainers/image-spec
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-05-31 17:36:12 +00:00
dependabot[bot]
9c1f1f8d84
build(deps): bump github.com/docker/cli ( #1816 )
...
Bumps [github.com/docker/cli](https://github.com/docker/cli ) from 23.0.6+incompatible to 24.0.1+incompatible.
- [Commits](https://github.com/docker/cli/compare/v23.0.6...v24.0.1 )
---
updated-dependencies:
- dependency-name: github.com/docker/cli
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-05-31 15:43:03 +00:00
Joseph Mearman
3cfc2cf9c3
add instruction for using gh auth token ( #1831 )
2023-05-31 14:24:24 +00:00
dependabot[bot]
b0996e0577
build(deps): bump github.com/go-git/go-git/v5 ( #1830 )
...
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git ) from 5.6.2-0.20230411180853-ce62f3e9ff86 to 5.7.0.
- [Release notes](https://github.com/go-git/go-git/releases )
- [Commits](https://github.com/go-git/go-git/commits/v5.7.0 )
---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-05-29 03:35:06 +00:00
dependabot[bot]
481999f59d
build(deps): bump megalinter/megalinter from 6.22.2 to 7.0.2 ( #1827 )
...
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter ) from 6.22.2 to 7.0.2.
- [Release notes](https://github.com/megalinter/megalinter/releases )
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md )
- [Commits](https://github.com/megalinter/megalinter/compare/v6.22.2...v7.0.2 )
---
updated-dependencies:
- dependency-name: megalinter/megalinter
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-29 03:12:45 +00:00
ab-pkandhari
11dd2ac745
fix: Update ARCH environment variable used in runners/actions ( #1818 )
2023-05-23 12:26:47 +00:00
harryzcy
e3271d8469
Remove trailing slash from instance address ( #197 )
...
Related #136
Co-authored-by: harryzcy <harry@harryzheng.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/197
Reviewed-by: Jason Song <i@wolfogre.com >
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: harryzcy <harryzcy@noreply.gitea.io >
Co-committed-by: harryzcy <harryzcy@noreply.gitea.io >
2023-05-22 23:50:29 +08:00
dependabot[bot]
16c574cd26
build(deps): bump github.com/moby/buildkit from 0.11.5 to 0.11.6 ( #1817 )
...
Bumps [github.com/moby/buildkit](https://github.com/moby/buildkit ) from 0.11.5 to 0.11.6.
- [Release notes](https://github.com/moby/buildkit/releases )
- [Commits](https://github.com/moby/buildkit/compare/v0.11.5...v0.11.6 )
---
updated-dependencies:
- dependency-name: github.com/moby/buildkit
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-05-22 04:02:38 +00:00
dependabot[bot]
06054d2931
build(deps): bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2 ( #1814 )
...
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus ) from 1.9.0 to 1.9.2.
- [Release notes](https://github.com/sirupsen/logrus/releases )
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md )
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.0...v1.9.2 )
---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-05-22 03:29:31 +00:00
dependabot[bot]
1371215aab
build(deps): bump codecov/codecov-action from 3.1.3 to 3.1.4 ( #1813 )
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.3...v3.1.4 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 03:12:14 +00:00
sillyguodong
84386c1b16
Add exec command flag of network ( #192 )
...
Related to #184
Add command flag of `network` for `exec`, the default value of `--network` is empty string. Valid values are: `host `, `bridge`, `<custom_network>` and empty string.
Co-authored-by: Jason Song <i@wolfogre.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/192
Reviewed-by: a1012112796 <1012112796@qq.com >
Reviewed-by: Jason Song <i@wolfogre.com >
Co-authored-by: sillyguodong <gedong_1994@163.com >
Co-committed-by: sillyguodong <gedong_1994@163.com >
2023-05-18 15:01:43 +08:00
ChristopherHX
fd7c8580af
Prevent exposing GITEA_RUNNER_REGISTRATION_TOKEN to act ( #188 )
...
You can currently expose the token to jobs even while using docker in docker
`-e GITEA_RUNNER_REGISTRATION_TOKEN` tells the docker client of act to read GITEA_RUNNER_REGISTRATION_TOKEN from the process and now it can be stolen.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/188
Reviewed-by: Jason Song <i@wolfogre.com >
Co-authored-by: ChristopherHX <christopherhx@noreply.gitea.io >
Co-committed-by: ChristopherHX <christopherhx@noreply.gitea.io >
2023-05-17 14:13:38 +08:00
sillyguodong
35596a182b
Add configuration item of container.network ( #184 )
...
Close https://gitea.com/gitea/act_runner/issues/177
Related https://gitea.com/gitea/act/pulls/56
### ⚠️ Breaking
The `container.network_mode` is a deprecated configuration item. It may be removed after Gitea 1.20 released.
Previously, if the value of `container.network_mode` is `bridge`, it means that `act_runner` will create a new network for job.But `bridge` is easily confused with the bridge network created by Docker by default.
We recommand that using `container.network` to specify the network to which containers created by `act_runner` connect.
### 🆕 container.network
The configuration file of `act_runner` add a new item of `contianer.network`.
In `config.example.yaml`:
```yaml
container:
# Specifies the network to which the container will connect.
# Could be host, bridge or the name of a custom network.
# If it's empty, act_runner will create a network automatically.
network: ""
```
As the comment in the example above says, the purpose of the `container.network` is specifying the network to which containers created by `act_runner` will connect.
`container.network` accepts the following valid values:
- `host`: All of containers (including job containers and service contianers) created by `act_runner` will be connected to the network named `host` which is created automatically by Docker. Containers will share the host’s network stack and all interfaces from the host will be available to these containers.
- `bridge`: It is similar to `host`. All of containers created by `act_runner` will be connected to the network named `bridge` which is created automatically by Docker. All containers connected to the `bridge` (Perhaps there are containers that are not created by `act_runner`) are allowed to communicate with each other, while providing isolation from containers which are not connected to that `bridge` network.
- `<custom_network>`: Please make sure that the `<custom_network>` network already exists firstly (`act_runner` does not detect whether the specified network exists currently. If not exists yet, will return error in the stage of `docker create`). All of containers created by `act_runner` will be connected to `<custom_network>`. After the job is executed, containers are removed and automatically disconnected from the `<custom_network>`.
- empty: `act_runner` will create a new network for each job container and their service containers (if defined in workflow). So each job container and their service containers share a network environment, but are isolated from others container and the Docker host. Of course, these networks created by `act_runner` will be removed at last.
### Others
- If you do not have special needs, we highly recommend that setting `container.network` to empty string (and do not use `container.network_mode` any more). Because the containers created by `act_runner` will connect to the networks that are created by itself. This point will provide better isolation.
- If you set `contianer.network` to empty string or `<custom_network>`, we can be access to service containers by `<service-id>:<port>` in the steps of job. Because we added an alias to the service container when connecting to the network.
Co-authored-by: Jason Song <i@wolfogre.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/184
Reviewed-by: Jason Song <i@wolfogre.com >
Co-authored-by: sillyguodong <gedong_1994@163.com >
Co-committed-by: sillyguodong <gedong_1994@163.com >
2023-05-16 14:46:59 +08:00
dependabot[bot]
1eacf23dcb
build(deps): bump github.com/opencontainers/image-spec ( #1807 )
...
Bumps [github.com/opencontainers/image-spec](https://github.com/opencontainers/image-spec ) from 1.1.0-rc2.0.20221005185240-3a7f492d3f1b to 1.1.0-rc.3.
- [Release notes](https://github.com/opencontainers/image-spec/releases )
- [Changelog](https://github.com/opencontainers/image-spec/blob/main/RELEASES.md )
- [Commits](https://github.com/opencontainers/image-spec/commits/v1.1.0-rc3 )
---
updated-dependencies:
- dependency-name: github.com/opencontainers/image-spec
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-05-15 03:43:06 +00:00
dependabot[bot]
c00810bdf4
build(deps): bump github.com/docker/docker ( #1806 )
...
Bumps [github.com/docker/docker](https://github.com/docker/docker ) from 23.0.5+incompatible to 23.0.6+incompatible.
- [Release notes](https://github.com/docker/docker/releases )
- [Commits](https://github.com/docker/docker/compare/v23.0.5...v23.0.6 )
---
updated-dependencies:
- dependency-name: github.com/docker/docker
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-05-15 03:28:21 +00:00
dependabot[bot]
39abbce4e6
build(deps): bump github.com/docker/cli ( #1805 )
...
Bumps [github.com/docker/cli](https://github.com/docker/cli ) from 23.0.5+incompatible to 23.0.6+incompatible.
- [Commits](https://github.com/docker/cli/compare/v23.0.5...v23.0.6 )
---
updated-dependencies:
- dependency-name: github.com/docker/cli
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 03:12:21 +00:00
silverwind
c9d3f67264
Add .editorconfig and .gitattributes ( #186 )
...
Add some files that belong in every repo.
- `.editorconfig` is based on `gitea` repo.
- `.gitattributes` is useful for Windows users.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/186
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-by: delvh <dev.lh@web.de >
Co-authored-by: silverwind <me@silverwind.io >
Co-committed-by: silverwind <me@silverwind.io >
2023-05-13 23:51:22 +08:00
dependabot[bot]
b5fa24537f
build(deps): bump github.com/docker/distribution ( #1801 )
...
Bumps [github.com/docker/distribution](https://github.com/docker/distribution ) from 2.8.1+incompatible to 2.8.2+incompatible.
- [Release notes](https://github.com/docker/distribution/releases )
- [Commits](https://github.com/docker/distribution/compare/v2.8.1...v2.8.2 )
---
updated-dependencies:
- dependency-name: github.com/docker/distribution
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-05-11 21:19:02 +00:00
dependabot[bot]
046f5aa715
build(deps): bump github.com/cloudflare/circl from 1.1.0 to 1.3.3 ( #1800 )
...
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl ) from 1.1.0 to 1.3.3.
- [Release notes](https://github.com/cloudflare/circl/releases )
- [Commits](https://github.com/cloudflare/circl/compare/v1.1.0...v1.3.3 )
---
updated-dependencies:
- dependency-name: github.com/cloudflare/circl
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-11 21:00:01 +00:00
Alex Lau (AvengerMoJo)
94031fc198
Fix README.md typo on daemon ( #183 )
...
It is just a typo fix.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/183
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.io >
Reviewed-by: Jason Song <i@wolfogre.com >
Co-authored-by: Alex Lau (AvengerMoJo) <avengermojo@gmail.com >
Co-committed-by: Alex Lau (AvengerMoJo) <avengermojo@gmail.com >
2023-05-11 14:25:39 +08:00
sillyguodong
d5e4baed54
Fix missing runner version when building images from a Dockerfile ( #181 )
...
regression of https://gitea.com/gitea/act_runner/pulls/172
https://gitea.com/gitea/act_runner/actions/runs/400/jobs/1
In the step of `Build and push`, log output that `git: not found`. This lead to runner's version not being injected when go compile.

Co-authored-by: Jason Song <i@wolfogre.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/181
Reviewed-by: Jason Song <i@wolfogre.com >
Co-authored-by: sillyguodong <gedong_1994@163.com >
Co-committed-by: sillyguodong <gedong_1994@163.com >
v0.1.8
2023-05-09 16:44:31 +08:00
sando38
d4caa7e065
Dockerfile: Improve signal handling by adding a runtime init ( #180 )
...
This adds tini as a runtime init (https://github.com/krallin/tini ). It improves signal handling for the container, see https://github.com/krallin/tini#why-tini .
An alternative could be to run the container with `docker run --init ...` which also places tini as a runtime init as PID 1.
Co-authored-by: sando38 <sandomir@tutanota.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/180
Reviewed-by: Jason Song <i@wolfogre.com >
Co-authored-by: sando38 <sando38@noreply.gitea.io >
Co-committed-by: sando38 <sando38@noreply.gitea.io >
2023-05-09 16:09:48 +08:00
dependabot[bot]
65ef31f102
build(deps): bump github.com/moby/buildkit from 0.11.5 to 0.11.6 ( #1791 )
...
Bumps [github.com/moby/buildkit](https://github.com/moby/buildkit ) from 0.11.5 to 0.11.6.
- [Release notes](https://github.com/moby/buildkit/releases )
- [Commits](https://github.com/moby/buildkit/compare/v0.11.5...v0.11.6 )
---
updated-dependencies:
- dependency-name: github.com/moby/buildkit
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 03:15:32 +00:00
Jason Song
de4160b023
Skip counting log length when parseLogRow return nil ( #176 )
...
Fix:

Regression of #149 , `LogLength` could be incorrect.
It may be related to https://github.com/go-gitea/gitea/issues/24458
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/176
Reviewed-by: Zettat123 <zettat123@noreply.gitea.io >
Reviewed-by: wxiaoguang <wxiaoguang@noreply.gitea.io >
v0.1.7
2023-05-06 17:00:52 +08:00
a1012112796
609c0a0773
fix --event option logic for exec ( #175 )
...
- fix `--event` option logic
- by the way, apply a `TODO` logic
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/175
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: a1012112796 <1012112796@qq.com >
Co-committed-by: a1012112796 <1012112796@qq.com >
2023-05-06 11:27:08 +08:00
Jason Song
0c029f7e79
Upgrade act and use new artifactcache ( #174 )
...
- Upgrade act to v0.245.1
- Replace `gitea.com/gitea/act_runner/internal/app/artifactcache` with `github.com/nektos/act/pkg/artifactcache`
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/174
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-05-04 18:45:01 +08:00