@@ -4,7 +4,10 @@ name: bump-vm-images
4
4
on :
5
5
workflow_dispatch :
6
6
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"
8
11
9
12
permissions :
10
13
contents : read
13
16
JOB_URL : " ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
14
17
15
18
jobs :
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
+
16
32
bump :
17
33
permissions :
18
34
contents : write
19
35
pull-requests : write
20
36
runs-on : ubuntu-latest
37
+ needs :
38
+ - filter
39
+ strategy :
40
+ fail-fast : false
41
+ matrix : ${{ fromJson(needs.filter.outputs.matrix) }}
21
42
steps :
22
43
- uses : actions/checkout@v4
23
44
@@ -26,26 +47,11 @@ jobs:
26
47
command : apply --config .ci/updatecli/updatecli-bump-vm-images.yml --values .ci/updatecli/values.d/scm.yml
27
48
env :
28
49
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50
+ BRANCH_NAME : ${{ matrix.branch }}
29
51
30
52
- if : ${{ failure() }}
31
- uses : slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
53
+ uses : elastic/oblt-actions/slack/send@v1
32
54
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