Skip to content

Commit 3d7fe1f

Browse files
feat: [DevOps] Orchestration spec update automation (#558)
* feat: [DevOps] Orchestration spec update automation * fix branch name * finito * fix tag name
1 parent 826d351 commit 3d7fe1f

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

.github/workflows/weekly-spec-update.yaml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,59 @@ jobs:
88
update-all-specs:
99
runs-on: ubuntu-latest
1010
permissions:
11-
contents: write
12-
pull-requests: write
11+
actions: write
1312

1413
strategy:
1514
matrix:
1615
file:
1716
- core
1817
- document-grounding
1918
- prompt-registry
19+
- orchestration
2020

2121
steps:
2222
- name: "Checkout repository"
2323
uses: actions/checkout@v4
2424

25+
- name: "Get orchestration version"
26+
if: matrix.file == 'orchestration'
27+
run: |
28+
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}')
29+
30+
if [ -z "$ORCH_VERSION" ]; then
31+
echo "Failed to fetch orchestration version"
32+
exit 1
33+
fi
34+
echo "Orchestration version: $ORCH_VERSION"
35+
echo "ORCH_VERSION=$ORCH_VERSION" >> $GITHUB_ENV
36+
env:
37+
TOKEN: ${{ secrets.GH_TOOLS_TOKEN }}
38+
39+
2540
- name: "Trigger spec update"
2641
run: |
42+
BRANCH="main"
43+
if [ "${{ matrix.file }}" = "orchestration" ]; then
44+
BRANCH="rel/$ORCH_VERSION"
45+
fi
46+
echo "Using branch: $BRANCH"
47+
2748
gh workflow run spec-update.yaml \
2849
--field file=${{ matrix.file }} \
29-
--field file-ref=main \
50+
--field file-ref=$BRANCH \
3051
--field create-pr=true
3152
env:
3253
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
55+
- name: "Slack Notification"
56+
if: failure()
57+
uses: slackapi/[email protected]
58+
with:
59+
webhook: ${{ secrets.SLACK_WEBHOOK }}
60+
webhook-type: incoming-webhook
61+
payload: |
62+
blocks:
63+
- type: "section"
64+
text:
65+
type: "mrkdwn"
66+
text: "⚠️ Weekly spec update failed! 😬 Please inspect & fix by clicking <https://github.com/SAP/ai-sdk-java/actions/runs/${{ github.run_id }}|here>"

0 commit comments

Comments
 (0)