bump-vm-images #4
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: bump-vm-images | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # Since the CI Agent images are produced weekly on Saturday at 0am UTC | |
| # and we can only bump the version after the images are available | |
| # let's try on Saturday at 12:00 UTC. | |
| - cron: "0 12 * * 6" | |
| permissions: | |
| contents: read | |
| env: | |
| JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
| jobs: | |
| filter: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 1 | |
| outputs: | |
| matrix: ${{ steps.generator.outputs.matrix }} | |
| permissions: | |
| contents: read | |
| steps: | |
| - id: generator | |
| uses: elastic/oblt-actions/elastic/active-branches@v1 | |
| with: | |
| filter-branches: true | |
| bump: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| needs: | |
| - filter | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.filter.outputs.matrix) }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: elastic/oblt-actions/updatecli/run@v1 | |
| with: | |
| command: apply --config .ci/updatecli/updatecli-bump-vm-images.yml --values .ci/updatecli/values.d/scm.yml | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| BRANCH_NAME: ${{ matrix.branch }} | |
| - if: ${{ failure() }} | |
| uses: elastic/oblt-actions/slack/send@v1 | |
| with: | |
| bot-token: ${{ secrets.SLACK_BOT_TOKEN }} | |
| channel-id: "#ingest-notifications" | |
| message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <${{ env.JOB_URL }}|here>" |