fix(analytics-mailer): strictly enforce monthly reports and remove weekly logic completely
Some checks failed
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 3s
Monorepo Pipeline / 🧹 Lint (push) Failing after 1m24s
Monorepo Pipeline / 🧪 Test (push) Successful in 42s
Monorepo Pipeline / 🏗️ Build (push) Successful in 2m10s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
🏥 Server Maintenance / 🧹 Prune & Clean (push) Failing after 8s
Some checks failed
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 3s
Monorepo Pipeline / 🧹 Lint (push) Failing after 1m24s
Monorepo Pipeline / 🧪 Test (push) Successful in 42s
Monorepo Pipeline / 🏗️ Build (push) Successful in 2m10s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
🏥 Server Maintenance / 🧹 Prune & Clean (push) Failing after 8s
This commit is contained in:
@@ -1,25 +1,14 @@
|
||||
name: Analytics Mailer
|
||||
name: Analytics Mailer (Monthly)
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Run weekly on Monday at 08:00 UTC
|
||||
- cron: '0 8 * * 1'
|
||||
# Run monthly on the 1st day of the month at 08:30 UTC
|
||||
- cron: '30 8 1 * *'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
interval:
|
||||
description: 'Interval to run (weekly or monthly)'
|
||||
required: true
|
||||
default: 'weekly'
|
||||
type: choice
|
||||
options:
|
||||
- weekly
|
||||
- monthly
|
||||
|
||||
jobs:
|
||||
send-reports:
|
||||
name: 📊 Send Analytics Reports
|
||||
name: 📊 Send Analytics Reports (Monthly)
|
||||
runs-on: docker
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
@@ -56,18 +45,5 @@ jobs:
|
||||
- name: Build analytics mailer
|
||||
run: pnpm --filter @mintel/analytics-mailer build
|
||||
|
||||
- name: Determine Interval
|
||||
id: set-interval
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "schedule" ]; then
|
||||
if [ "${{ github.event.schedule }}" = "0 8 * * 1" ]; then
|
||||
echo "interval=weekly" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "interval=monthly" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
else
|
||||
echo "interval=${{ github.event.inputs.interval }}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Run Analytics Mailer
|
||||
run: pnpm --filter @mintel/analytics-mailer run start -- --interval=${{ steps.set-interval.outputs.interval }}
|
||||
run: pnpm --filter @mintel/analytics-mailer run start
|
||||
Reference in New Issue
Block a user