From ec5bd715b1d75c571e4addcc045c9cbec31b02f4 Mon Sep 17 00:00:00 2001 From: Will Estes Date: Thu, 13 Aug 2026 13:41:11 -0400 Subject: [PATCH] Bump eec-campaigns to v0.1.7, scope sync to changed campaigns Only the campaign(s) whose files changed in this push get resolved and diffed against listmonk now, instead of every campaign every time -- falls back to a full scan automatically if the before-commit can't be determined. fetch-depth: 0 so that commit is always available to diff against locally. --- .gitea/workflows/send.yml | 2 +- .gitea/workflows/sync-template.yml | 2 +- .gitea/workflows/sync.yml | 6 ++++-- .gitea/workflows/test.yml | 2 +- README.md | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/send.yml b/.gitea/workflows/send.yml index 63a448d..178ec02 100644 --- a/.gitea/workflows/send.yml +++ b/.gitea/workflows/send.yml @@ -29,7 +29,7 @@ jobs: go-version: "1.23.1" - name: Install eec-campaigns - run: go install gitea.reground.org/will/eec-campaigns@v0.1.6 + run: go install gitea.reground.org/will/eec-campaigns@v0.1.7 - name: Determine campaign slug id: slug diff --git a/.gitea/workflows/sync-template.yml b/.gitea/workflows/sync-template.yml index 6cfd6d6..6bede67 100644 --- a/.gitea/workflows/sync-template.yml +++ b/.gitea/workflows/sync-template.yml @@ -13,7 +13,7 @@ jobs: go-version: "1.23.1" - name: Install eec-campaigns - run: go install gitea.reground.org/will/eec-campaigns@v0.1.6 + run: go install gitea.reground.org/will/eec-campaigns@v0.1.7 - name: Sync template to listmonk run: eec-campaigns template "Thistle & Moth default" email-templates/campaign.html diff --git a/.gitea/workflows/sync.yml b/.gitea/workflows/sync.yml index 19763d4..81a6fee 100644 --- a/.gitea/workflows/sync.yml +++ b/.gitea/workflows/sync.yml @@ -8,16 +8,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-go@v5 with: go-version: "1.23.1" - name: Install eec-campaigns - run: go install gitea.reground.org/will/eec-campaigns@v0.1.6 + run: go install gitea.reground.org/will/eec-campaigns@v0.1.7 - name: Sync campaigns to listmonk - run: eec-campaigns sync . + run: eec-campaigns sync . "${{ gitea.event.before }}" env: LISTMONK_BASE_URL: ${{ secrets.CAMPAIGNS_LISTMONK_BASE_URL }} LISTMONK_API_USER: ${{ secrets.CAMPAIGNS_LISTMONK_API_USER }} diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 43251df..5d88132 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -22,7 +22,7 @@ jobs: go-version: "1.23.1" - name: Install eec-campaigns - run: go install gitea.reground.org/will/eec-campaigns@v0.1.6 + run: go install gitea.reground.org/will/eec-campaigns@v0.1.7 - name: Send preview run: eec-campaigns test "${{ inputs.slug }}" "${{ inputs.email }}" diff --git a/README.md b/README.md index 195ebba..f51ec6f 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Alternatively, run the `Send campaign` workflow manually from Gitea Actions with Repo secrets (Gitea Actions → Secrets) are already set: `CAMPAIGNS_LISTMONK_BASE_URL`, `CAMPAIGNS_LISTMONK_API_USER`, `CAMPAIGNS_LISTMONK_API_TOKEN` — scoped to a dedicated `campaigns-thistleandmoth` listmonk API user (see `reground-infrastructure`'s `campaigns-thistleandmoth` Ansible role). `CAMPAIGNS_PREVIEW_EMAIL` isn't set yet — add it (or rely on each campaign's own `preview_emails`) before the first real send. -The workflows in `.gitea/workflows/` pin a specific `eec-campaigns` version (currently `v0.1.6`). Bump that pin deliberately when a new tool version is ready, not automatically. +The workflows in `.gitea/workflows/` pin a specific `eec-campaigns` version (currently `v0.1.7`). Bump that pin deliberately when a new tool version is ready, not automatically. ## Sending as hello@thistleandmoth.org