Weekly Spec Update #63
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| - batch | |
| steps: | |
| - name: 'Checkout repository' | |
| uses: actions/checkout@v6 | |
| - name: 'Get orchestration version' | |
| if: matrix.service == 'orchestration' | |
| run: | | |
| ORCH_VERSION=$(curl --silent --request GET --url "$ORCH_GITOPS_LINK" -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 }} | |
| ORCH_GITOPS_LINK: ${{ secrets.ORCH_GITOPS_LINK }} | |
| - 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 \ | |
| --field is-weekly=true | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: 'Slack Notification' | |
| if: failure() | |
| uses: slackapi/slack-github-action@v3.0.3 | |
| 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>" |