Skip to content

bump-elastic-stack-snapshot #628

bump-elastic-stack-snapshot

bump-elastic-stack-snapshot #628

---
name: bump-elastic-stack-snapshot
on:
workflow_dispatch:
schedule:
- cron: '0 15 * * 1-5'
permissions:
contents: read
jobs:
filter:
runs-on: ubuntu-latest
timeout-minutes: 1
outputs:
matrix: ${{ steps.generator.outputs.matrix }}
steps:
- id: generator
uses: elastic/oblt-actions/elastic/active-branches@v1
bump-elastic-stack:
runs-on: ubuntu-latest
needs: [filter]
permissions:
contents: write
pull-requests: write
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.filter.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Install Updatecli in the runner
uses: updatecli/updatecli-action@307ce72e224b82157cc31c78828f168b8e55d47d # v2.84.0
- name: Run Updatecli in Apply mode
run: updatecli apply --config .ci/bump-elastic-stack-snapshot.yml
env:
BRANCH: ${{ matrix.branch }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_USER: "github-actions[bot]"
GIT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
- if: ${{ failure() }}
uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52 # v2.1.0
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
{
"channel": "#fleet-notifications",
"text": "${{ env.MESSAGE }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ env.MESSAGE }}"
}
}
]
}
env:
MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@fleet_team` please look what's going on <${{ env.JOB_URL }}|here>"