Compare commits
3 Commits
renovate/h
...
0aad1e9bb0
| Author | SHA1 | Date | |
|---|---|---|---|
| 0aad1e9bb0 | |||
| 6db02b2cf0 | |||
| 6c9163781b |
@@ -14,7 +14,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: hashicorp/setup-terraform@v4
|
- uses: hashicorp/setup-terraform@v3
|
||||||
|
|
||||||
- name: fmt check — 1-nixos-node
|
- name: fmt check — 1-nixos-node
|
||||||
run: terraform fmt -check -recursive
|
run: terraform fmt -check -recursive
|
||||||
@@ -52,39 +52,3 @@ jobs:
|
|||||||
echo "==> $f"
|
echo "==> $f"
|
||||||
nomad job validate "$f"
|
nomad job validate "$f"
|
||||||
done
|
done
|
||||||
|
|
||||||
image-pull:
|
|
||||||
name: Docker image pull validation
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# Only run on PRs that touch nomad job specs
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Pull changed images
|
|
||||||
run: |
|
|
||||||
git fetch origin ${{ github.base_ref }}
|
|
||||||
IMAGES=$(git diff origin/${{ github.base_ref }}...HEAD -- '*.nomad.hcl' \
|
|
||||||
| grep '^+\s*image\s*=' \
|
|
||||||
| grep -oP '"[^"]+:[^"]+"' \
|
|
||||||
| tr -d '"' \
|
|
||||||
| sort -u || true)
|
|
||||||
|
|
||||||
if [ -z "$IMAGES" ]; then
|
|
||||||
echo "No image changes detected, skipping pull."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
FAILED=0
|
|
||||||
while IFS= read -r image; do
|
|
||||||
echo "==> Pulling $image"
|
|
||||||
if ! docker pull "$image"; then
|
|
||||||
echo "ERROR: Failed to pull $image"
|
|
||||||
FAILED=1
|
|
||||||
fi
|
|
||||||
done <<< "$IMAGES"
|
|
||||||
|
|
||||||
exit $FAILED
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ job "act-runner" {
|
|||||||
|
|
||||||
env = {
|
env = {
|
||||||
GITEA_INSTANCE_URL = "https://gitea-1ef0bea6b75a4fd3e9393a9f7f7e4b02.othrayte.one"
|
GITEA_INSTANCE_URL = "https://gitea-1ef0bea6b75a4fd3e9393a9f7f7e4b02.othrayte.one"
|
||||||
|
CONFIG_FILE = "/secrets/runner-config.yml"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Required SOPS key:
|
# Required SOPS key:
|
||||||
@@ -42,6 +43,19 @@ EOF
|
|||||||
env = true
|
env = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Limit which images/labels the runner will accept so it doesn't pick up
|
||||||
|
# unrelated workloads if more runners are added later.
|
||||||
|
template {
|
||||||
|
data = <<EOF
|
||||||
|
runner:
|
||||||
|
labels:
|
||||||
|
- "ubuntu-latest:docker://node:20-bookworm"
|
||||||
|
- "ubuntu-22.04:docker://node:20-bookworm"
|
||||||
|
- "ubuntu-24.04:docker://node:20-bookworm"
|
||||||
|
EOF
|
||||||
|
destination = "secrets/runner-config.yml"
|
||||||
|
}
|
||||||
|
|
||||||
resources {
|
resources {
|
||||||
cpu = 200
|
cpu = 200
|
||||||
memory = 256
|
memory = 256
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ exit 1
|
|||||||
- [x] **Phase 1a**: Create `act-runner.nomad.hcl` + Terraform wrapper, register runner token in Gitea, get a hello-world workflow green
|
- [x] **Phase 1a**: Create `act-runner.nomad.hcl` + Terraform wrapper, register runner token in Gitea, get a hello-world workflow green
|
||||||
- [x] **Phase 1b**: Add `terraform fmt` + `terraform validate -backend=false` workflow — no secrets needed
|
- [x] **Phase 1b**: Add `terraform fmt` + `terraform validate -backend=false` workflow — no secrets needed
|
||||||
- [x] **Phase 1c**: Add Nomad validate step — add `NOMAD_ADDR` + read-only `NOMAD_TOKEN` to Gitea secrets
|
- [x] **Phase 1c**: Add Nomad validate step — add `NOMAD_ADDR` + read-only `NOMAD_TOKEN` to Gitea secrets
|
||||||
- [x] **Phase 2**: Add image pull validation step to the workflow
|
- [ ] **Phase 2**: Add image pull validation step to the workflow
|
||||||
- [ ] **Phase 3a**: Add `update` stanzas to ntfy and glance (simplest, no volume conflict)
|
- [ ] **Phase 3a**: Add `update` stanzas to ntfy and glance (simplest, no volume conflict)
|
||||||
- [ ] **Phase 3b**: Add rolling `update` stanzas to remaining service jobs (jellyfin, sonarr, etc.)
|
- [ ] **Phase 3b**: Add rolling `update` stanzas to remaining service jobs (jellyfin, sonarr, etc.)
|
||||||
- [ ] **Phase 3c**: Add health checks to openreader and unifi before adding update stanzas
|
- [ ] **Phase 3c**: Add health checks to openreader and unifi before adding update stanzas
|
||||||
|
|||||||
Reference in New Issue
Block a user