Compare commits

...

3 Commits

Author SHA1 Message Date
Gonçalo Rodrigues
5657ec530a feat(cicd): add Gitea CI workflow for feature branches and PRs
Some checks failed
deploy / deploy-finance (push) Has been cancelled
deploy / test (push) Has been cancelled
2026-06-26 23:50:23 +01:00
Gonçalo Rodrigues
6afc95ef4c fix(cicd): wait for DinD to be ready before starting act runner 2026-06-26 23:45:53 +01:00
Gonçalo Rodrigues
bd174be094 fix(cicd): switch act runner to Docker mode with node:20 image
Host mode lacks Node.js so actions/checkout@v4 fails. Switch label to
ubuntu-latest:docker:node:20 which has Node.js for JS actions. Install
Docker CLI in the deploy job since node:20 doesn't include it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 23:43:44 +01:00
3 changed files with 29 additions and 1 deletions

20
.gitea/workflows/ci.yaml Normal file
View 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 ./...

View File

@ -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 }}" \

View File

@ -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