also do terraform

This commit is contained in:
Rasmus Wejlgaard 2026-09-14 20:18:16 +01:00
parent faca154a7e
commit 6fa8074a8a
3 changed files with 8 additions and 7 deletions

View file

@ -9,14 +9,11 @@ on:
- "docs/**"
- "**/*.md"
- ".github/**"
# Daily fleet deploy at midday to catch drift from anything changed by hand.
# Cron is UTC: 11:00 UTC is 12:00 in London during BST, 11:00 during GMT.
schedule:
- cron: "0 11 * * *"
# Serialize fleet deploys so two quick merges (or a merge and the daily run)
# can't run Ansible against the same hosts at once. Don't cancel an in-flight
# deploy mid-run — queue it.
# Serialize fleet deploys so two quick merges can't run Ansible against the
# same hosts at once. Don't cancel an in-flight deploy mid-run — queue it.
concurrency:
group: deploy-on-merge
cancel-in-progress: false

View file

@ -6,6 +6,8 @@ on:
paths:
- "terraform/**"
- ".github/workflows/terraform.yml"
schedule:
- cron: "0 11 * * *"
# Requires these repository secrets:
# AGE_SECRET_KEY — age private key for SOPS decryption
@ -43,7 +45,7 @@ jobs:
run: tofu plan -out=tfplan
- name: Upload plan
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v7
with:
name: tfplan
@ -53,7 +55,7 @@ jobs:
apply:
name: Apply
needs: plan
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: production
steps:

View file

@ -29,6 +29,8 @@ make deploy-host HOST=helsinki-a
Ad-hoc runs against a single host or playbook go through the manual `deploy.yml` workflow.
`.github/workflows/terraform.yml` runs plan + apply on the same daily schedule, as well as on merges touching `terraform/`.
## Playbooks
| Playbook | Purpose | Usage |