Skip to content

update-beats

update-beats #84

name: update-beats
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 1-5'
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:
exclude-branches: "7.17,8.17,8.18,9.0"
filter-branches: true
update-beats:
permissions:
contents: write
pull-requests: write
needs:
- filter
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.filter.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Install mage
uses: magefile/mage-action@6f50bbb8ea47d56e62dee92392788acbc8192d0b # v3.1.0
with:
version: v1.14.0
install-only: true
- name: Run Updatecli in Apply mode
uses: elastic/oblt-actions/updatecli/run@v1
with:
command: apply --config .ci/updatecli/update-beats.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 }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>"