summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--].SRCINFO21
-rwxr-xr-x[-rw-r--r--]PKGBUILD45
-rw-r--r--act_runner.service12
-rw-r--r--act_runner.yaml53
4 files changed, 105 insertions, 26 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 68cce9c708ed..c48fc9358e55 100644..100755
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,19 @@
-pkgbase = act
- pkgdesc = Run your GitHub Actions locally
- pkgver = 0.2.45
+pkgbase = act-runner
+ pkgdesc = A runner for Gitea Actions based on GitHub's Act
+ pkgver = 0.2.3
pkgrel = 1
- url = https://github.com/nektos/act
- arch = i686
+ url = https://gitea.com/gitea/act_runner
arch = x86_64
license = MIT
makedepends = go
depends = docker
- source = act-0.2.45.tar.gz::https://github.com/nektos/act/archive/v0.2.45.tar.gz
- sha256sums = 49f6afd10253b4c4dfe36f89f633dfea325d5133a6eee8842e320994b2a08f39
+ depends = gitea
+ provides = act_runner
+ source = act_runner-0.2.3.tar.gz::https://gitea.com/gitea/act_runner/archive/v0.2.3.tar.gz
+ source = act_runner.service
+ source = act_runner.yaml
+ sha256sums = SKIP
+ sha256sums = d776f0d17d6daf7fdaf1ce36ac7e1b66317d23cf334f644b6f85735313a18e41
+ sha256sums = c7daf8870a1b8ac67358b912e0511be1f815345a6b7bd9643050e9c3a48f83e9
-pkgname = act
+pkgname = act-runner
diff --git a/PKGBUILD b/PKGBUILD
index 9b6a634bd61d..17708fff23bf 100644..100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,20 +1,26 @@
-# Maintainer: Filipe Nascimento <flipee at tuta dot io>
+# Maintainer: Ben Parsons <9parsonsb[at]gmail[dot]com>
+# Contributor: Filipe Nascimento <flipee at tuta dot io>
# Contributor: Sven Lechner <sven[dot]lechner[at]rwth-aachen[dot]de>
-pkgname=act
-pkgver=0.2.45
+pkgname=act-runner
+pkgver=0.2.3
pkgrel=1
-pkgdesc="Run your GitHub Actions locally"
-arch=('i686' 'x86_64')
-url="https://github.com/nektos/act"
+pkgdesc="A runner for Gitea Actions based on GitHub's Act"
+arch=('x86_64')
+url="https://gitea.com/gitea/act_runner"
license=('MIT')
-depends=('docker')
+depends=('docker' 'gitea')
+provides=('act_runner')
makedepends=('go')
-source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
-sha256sums=('49f6afd10253b4c4dfe36f89f633dfea325d5133a6eee8842e320994b2a08f39')
+source=("act_runner-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
+ 'act_runner.service'
+ 'act_runner.yaml')
+sha256sums=('SKIP'
+ 'd776f0d17d6daf7fdaf1ce36ac7e1b66317d23cf334f644b6f85735313a18e41'
+ 'c7daf8870a1b8ac67358b912e0511be1f815345a6b7bd9643050e9c3a48f83e9')
build() {
- cd $pkgname-$pkgver
+ cd act_runner
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
@@ -22,16 +28,19 @@ build() {
export CGO_LDFLAGS="${LDFLAGS}"
go build \
- -trimpath \
- -buildmode=pie \
- -mod=readonly \
- -modcacherw \
+ -buildvcs=false \
-ldflags "-linkmode=external -X main.version=$pkgver"
}
package() {
- cd $pkgname-$pkgver
- install -Dm755 $pkgname -t "$pkgdir/usr/bin"
- install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
- install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+ cd act_runner
+ install -Dm755 act_runner -t "$pkgdir/usr/bin"
+ install -Dm644 README.md -t "$pkgdir/usr/share/doc/act_runner"
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/act_runner"
+
+ # install service
+ install -Dm644 "$srcdir/act_runner.service" "$pkgdir/usr/lib/systemd/system/act_runner.service"
+
+ # install config
+ install -Dm644 "$srcdir/act_runner.yaml" "$pkgdir/etc/act_runner/act_runner.yaml"
}
diff --git a/act_runner.service b/act_runner.service
new file mode 100644
index 000000000000..cde5f859f172
--- /dev/null
+++ b/act_runner.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Act Runner
+After=gitea.service
+
+[Service]
+type=exec
+ExecStart=/usr/bin/act_runner -c /etc/act_runner/act_runner.yaml daemon
+PrivateDevices=yes
+PrivateTmp=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/act_runner.yaml b/act_runner.yaml
new file mode 100644
index 000000000000..66fc70d51147
--- /dev/null
+++ b/act_runner.yaml
@@ -0,0 +1,53 @@
+# Example configuration file, it's safe to copy this as the default config file without any modification.
+
+log:
+ # The level of logging, can be trace, debug, info, warn, error, fatal
+ level: info
+
+runner:
+ # Where to store the registration result.
+ file: /etc/act_runner/.runner
+ # Execute how many tasks concurrently at the same time.
+ capacity: 1
+ # Extra environment variables to run jobs.
+ envs:
+ A_TEST_ENV_NAME_1: a_test_env_value_1
+ A_TEST_ENV_NAME_2: a_test_env_value_2
+ # Extra environment variables to run jobs from a file.
+ # It will be ignored if it's empty or the file doesn't exist.
+ env_file: .env
+ # The timeout for a job to be finished.
+ # Please note that the Gitea instance also has a timeout (3h by default) for the job.
+ # So the job could be stopped by the Gitea instance if it's timeout is shorter than this.
+ timeout: 3h
+ # Whether skip verifying the TLS certificate of the Gitea instance.
+ insecure: false
+ # The timeout for fetching the job from the Gitea instance.
+ fetch_timeout: 5s
+ # The interval for fetching the job from the Gitea instance.
+ fetch_interval: 2s
+
+cache:
+ # Enable cache server to use actions/cache.
+ enabled: true
+ # The directory to store the cache data.
+ # If it's empty, the cache data will be stored in $HOME/.cache/actcache.
+ dir: ""
+ # The host of the cache server.
+ # It's not for the address to listen, but the address to connect from job containers.
+ # So 0.0.0.0 is a bad choice, leave it empty to detect automatically.
+ host: ""
+ # The port of the cache server.
+ # 0 means to use a random available port.
+ port: 0
+
+container:
+ # Which network to use for the job containers. Could be bridge, host, none, or the name of a custom network.
+ network_mode: bridge
+ # Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker).
+ privileged: false
+ # And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).
+ options:
+ # The parent directory of a job's working directory.
+ # If it's empty, /workspace will be used.
+ workdir_parent: