Compare commits
3 Commits
713d60bccc
...
5657ec530a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5657ec530a | ||
|
|
6afc95ef4c | ||
|
|
bd174be094 |
20
.gitea/workflows/ci.yaml
Normal file
20
.gitea/workflows/ci.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Run tests
|
||||
run: go test ./...
|
||||
@ -23,6 +23,9 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Docker CLI
|
||||
run: apt-get update -qq && apt-get install -y -qq docker.io
|
||||
|
||||
- name: Login to Gitea registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" \
|
||||
|
||||
@ -100,13 +100,18 @@ resource "kubernetes_deployment" "act_runner" {
|
||||
command = ["/bin/sh", "-c"]
|
||||
args = [<<-EOT
|
||||
set -e
|
||||
echo "Waiting for Docker daemon..."
|
||||
until docker -H tcp://localhost:2375 info > /dev/null 2>&1; do
|
||||
sleep 2
|
||||
done
|
||||
echo "Docker daemon ready."
|
||||
if [ ! -f /data/.runner ]; then
|
||||
act_runner register \
|
||||
--no-interactive \
|
||||
--instance http://gitea-http.gitea.svc.cluster.local:3000 \
|
||||
--token "$(cat /etc/runner-token/token)" \
|
||||
--name "k3d-runner-$(hostname)" \
|
||||
--labels ubuntu-latest
|
||||
--labels ubuntu-latest:docker:node:20
|
||||
fi
|
||||
exec act_runner daemon --config /etc/act-runner/config.yaml
|
||||
EOT
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user