Skip to content

update-stable-snapshot #119

update-stable-snapshot

update-stable-snapshot #119

---
name: update-stable-snapshot
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
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:
# Remove exclusions when backports are merged
exclude-branches: "8.17,8.18,8.19,9.0"
filter-branches: true
update-stable-snapshot:
runs-on: ubuntu-latest
needs: [filter]
permissions:
contents: write
pull-requests: write
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.filter.outputs.matrix) }}
steps:
# We have same behavior for all branches.
- uses: actions/checkout@v4
- name: Run UpdateCLI in Apply mode
uses: elastic/oblt-actions/updatecli/run@v1
with:
command: apply --config .ci/updatecli/updatecli-bump-stack-version.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: Update Stable snapshot: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` and @robots-ci please look what's going on <${{ env.JOB_URL }}|here>"