Skip to content

Daily Digest

Daily Digest #39

Workflow file for this run

name: Daily Digest
on:
schedule:
# Run at 7:00 AM Oslo time
# 5:00 AM UTC = 7 AM Oslo (summer) / 6 AM Oslo (winter)
- cron: '0 5 * * *'
# Allow manual triggering
workflow_dispatch:
jobs:
generate-digest:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Build with Maven
run: mvn clean package -DskipTests
- name: Run Code Brief
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
run: java -jar target/code-brief.jar
- name: Notify on failure
if: failure()
uses: actions/github-script@v7
with:
script: |
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: '❌ Daily Digest Failed - ' + new Date().toISOString().split('T')[0],
body: 'The daily digest generation failed. Check the [workflow run](' + context.payload.repository.html_url + '/actions/runs/' + context.runId + ') for details.',
labels: ['bug', 'automated']
})