Skip to content

Weekly Spec Update

Weekly Spec Update #48

name: 'Weekly Spec Update'
on:
schedule:
- cron: '0 0 * * SUN' # Every Sunday at midnight UTC
workflow_dispatch:
jobs:
update-all-specs:
runs-on: ubuntu-latest
permissions:
actions: write
strategy:
matrix:
service:
- core
- document-grounding
- prompt-registry
- orchestration
- sap-rpt
steps:
- name: 'Checkout repository'
uses: actions/checkout@v6
- name: 'Get orchestration version'
if: matrix.service == 'orchestration'
run: |
ORCH_VERSION=$(curl --silent --request GET --url "https://github.tools.sap/api/v3/repos/MLF-prod/mlf-gitops-prod/contents/services/llm-orchestration/source/Chart.yaml?ref=aws.eu-central-1.prod-eu/current" -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.github.v3.raw" | grep 'version:' | awk '{print $2}')
if [ -z "$ORCH_VERSION" ]; then
echo "Failed to fetch orchestration version"
exit 1
fi
echo "Orchestration version: $ORCH_VERSION"
echo "ORCH_VERSION=$ORCH_VERSION" >> $GITHUB_ENV
env:
TOKEN: ${{ secrets.GH_TOOLS_TOKEN }}
- name: 'Trigger spec update'
run: |
BRANCH="main"
if [ "${{ matrix.service }}" = "orchestration" ]; then
# remove hotfix suffix 0.110.13-2 -> 0.110.13
ORCH_VERSION=$(echo "$ORCH_VERSION" | sed 's/-.*//')
BRANCH="rel-$ORCH_VERSION"
fi
echo "Using branch: $BRANCH"
gh workflow run spec-update.yaml \
--field service=${{ matrix.service }} \
--field ref=$BRANCH \
--field create-pr=true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Slack Notification'
if: failure()
uses: slackapi/slack-github-action@v2.1.1
with:
webhook: ${{ secrets.SLACK_WEBHOOK }}
webhook-type: incoming-webhook
payload: |
blocks:
- type: "section"
text:
type: "mrkdwn"
text: "⚠️ Weekly spec update failed! 😬 Please inspect & fix by clicking <https://github.com/SAP/ai-sdk-java/actions/runs/${{ github.run_id }}|here>"