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:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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
|
- name: Login to Gitea registry
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.REGISTRY_PASSWORD }}" \
|
echo "${{ secrets.REGISTRY_PASSWORD }}" \
|
||||||
|
|||||||
@ -100,13 +100,18 @@ resource "kubernetes_deployment" "act_runner" {
|
|||||||
command = ["/bin/sh", "-c"]
|
command = ["/bin/sh", "-c"]
|
||||||
args = [<<-EOT
|
args = [<<-EOT
|
||||||
set -e
|
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
|
if [ ! -f /data/.runner ]; then
|
||||||
act_runner register \
|
act_runner register \
|
||||||
--no-interactive \
|
--no-interactive \
|
||||||
--instance http://gitea-http.gitea.svc.cluster.local:3000 \
|
--instance http://gitea-http.gitea.svc.cluster.local:3000 \
|
||||||
--token "$(cat /etc/runner-token/token)" \
|
--token "$(cat /etc/runner-token/token)" \
|
||||||
--name "k3d-runner-$(hostname)" \
|
--name "k3d-runner-$(hostname)" \
|
||||||
--labels ubuntu-latest
|
--labels ubuntu-latest:docker:node:20
|
||||||
fi
|
fi
|
||||||
exec act_runner daemon --config /etc/act-runner/config.yaml
|
exec act_runner daemon --config /etc/act-runner/config.yaml
|
||||||
EOT
|
EOT
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user