@@ -4,7 +4,10 @@ name: bump-vm-images
44on :
55 workflow_dispatch :
66 schedule :
7- - cron : " 0 10 * * 0"
7+ # Since the CI Agent images are produced weekly on Saturday at 0am UTC
8+ # and we can only bump the version after the images are available
9+ # let's try on Saturday at 12:00 UTC.
10+ - cron : " 0 12 * * 6"
811
912permissions :
1013 contents : read
1316 JOB_URL : " ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
1417
1518jobs :
19+ filter :
20+ runs-on : ubuntu-latest
21+ timeout-minutes : 1
22+ outputs :
23+ matrix : ${{ steps.generator.outputs.matrix }}
24+ permissions :
25+ contents : read
26+ steps :
27+ - id : generator
28+ uses : elastic/oblt-actions/elastic/active-branches@v1
29+ with :
30+ filter-branches : true
31+
1632 bump :
1733 permissions :
1834 contents : write
1935 pull-requests : write
2036 runs-on : ubuntu-latest
37+ needs :
38+ - filter
39+ strategy :
40+ fail-fast : false
41+ matrix : ${{ fromJson(needs.filter.outputs.matrix) }}
2142 steps :
2243 - uses : actions/checkout@v4
2344
@@ -26,26 +47,11 @@ jobs:
2647 command : apply --config .ci/updatecli/updatecli-bump-vm-images.yml --values .ci/updatecli/values.d/scm.yml
2748 env :
2849 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50+ BRANCH_NAME : ${{ matrix.branch }}
2951
3052 - if : ${{ failure() }}
31- uses : slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
53+ uses : elastic/oblt-actions/slack/send@v1
3254 with :
33- method : chat.postMessage
34- token : ${{ secrets.SLACK_BOT_TOKEN }}
35- payload : |
36- {
37- "channel": "#ingest-notifications",
38- "text": "${{ env.SLACK_MESSAGE }}",
39- "blocks": [
40- {
41- "type": "section",
42- "text": {
43- "type": "mrkdwn",
44- "text": "${{ env.SLACK_MESSAGE }}"
45- }
46- }
47- ]
48- }
49- env :
50- # SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>"
51- SLACK_MESSAGE : " :traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`"
55+ bot-token : ${{ secrets.SLACK_BOT_TOKEN }}
56+ channel-id : " #ingest-notifications"
57+ message : " :traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <${{ env.JOB_URL }}|here>"
0 commit comments