Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/bump-agent-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
matrix: ${{ fromJson(needs.filter.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
ref: "${{ matrix.branch }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump-beats-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.filter.outputs.matrix) }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump-edot-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- uses: elastic/oblt-actions/updatecli/run@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- uses: elastic/oblt-actions/updatecli/run@v1
with:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/bump-kube-stack-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: bump-kube-stack-version

on:
workflow_dispatch:
schedule:
- cron: "0 20 * * 1-6"

permissions:
contents: read

env:
JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

jobs:
bump:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Install mage
uses: magefile/mage-action@6f50bbb8ea47d56e62dee92392788acbc8192d0b # v3.1.0
with:
version: v1.14.0
install-only: true

- uses: elastic/oblt-actions/updatecli/run@v1
with:
command: apply --config .ci/updatecli/updatecli-bump-kube-stack.yml --values .ci/updatecli/values.d/scm.yml
version-file: .updatecli-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- 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>"
2 changes: 1 addition & 1 deletion .github/workflows/bump-otel-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
matrix:
branch: ["main", "8.19"]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump-vm-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.filter.outputs.matrix) }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
# NOTE: as long as the updatecli bump differs between branches, we need to
# checkout the branch that we are going to bump that we are going to bump
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/catalog-info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
contents: read
packages: read
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- uses: elastic/oblt-actions/elastic/validate-catalog@v1

2 changes: 1 addition & 1 deletion .github/workflows/fragment-in-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
if: "!contains(github.event.pull_request.labels.*.name, 'skip-changelog') && !contains(github.event.pull_request.labels.*.name, 'backport')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: .go-version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: lint
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: macos-15
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
# pkg/testing/tools/git TestGetReleaseBranches test require full git history
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/post-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
Expand Down
101 changes: 101 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Update documentation

on:
schedule:
# Run weekly on Monday at 8:00 AM UTC
- cron: '0 8 * * 1'
workflow_dispatch:
# Allow manual triggering

jobs:
update-docs:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history including tags

- name: Add upstream remote and fetch tags
run: |
git remote add upstream https://github.com/elastic/elastic-agent.git || true
git fetch upstream --tags

- name: Find latest semantic version
id: get_version
run: |
# Get the latest semantic version tag (excluding pre-release versions)
LATEST_VERSION=$(git tag --list | grep -E "^v[0-9]+\.[0-9]+\.[0-9]+$" | sort -V | tail -1)
echo "Latest version: $LATEST_VERSION"
echo "version=$LATEST_VERSION" >> $GITHUB_OUTPUT

- name: Pass version to script
run: |
echo "LATEST_VERSION=${{ steps.get_version.outputs.version }}" >> $GITHUB_ENV

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/scripts/update-docs/requirements.txt

- name: Run documentation generator
run: |
cd docs/scripts/update-docs
python update-components-docs.py

- name: Check if branch already exists
id: check_branch
run: |
BRANCH_NAME="update-docs-${{ steps.get_version.outputs.version }}"
if git ls-remote --heads origin "$BRANCH_NAME" | grep -q "$BRANCH_NAME"; then
echo "Branch $BRANCH_NAME already exists. Documentation for this version has already been updated."
echo "branch_exists=true" >> $GITHUB_OUTPUT
else
echo "Branch $BRANCH_NAME does not exist. Proceeding with PR creation."
echo "branch_exists=false" >> $GITHUB_OUTPUT
fi

- name: Create Pull Request
if: steps.check_branch.outputs.branch_exists == 'false'
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "docs: update generated documentation for ${{ steps.get_version.outputs.version }}"
title: "Update generated documentation for ${{ steps.get_version.outputs.version }}"
body: |
This PR updates the generated documentation based on the latest released version **${{ steps.get_version.outputs.version }}**.

## Changes
- Updates EDOT Collector component tables
- Updates OpenTelemetry Collector Builder (OCB) configuration
- Uses data from the latest released version tag: `${{ steps.get_version.outputs.version }}`

## References
- **Source go.mod**: https://github.com/elastic/elastic-agent/blob/${{ steps.get_version.outputs.version }}/go.mod
- **Source core-components.yaml**: https://github.com/elastic/elastic-agent/blob/${{ steps.get_version.outputs.version }}/internal/pkg/otel/core-components.yaml
- **Release tag**: https://github.com/elastic/elastic-agent/tree/${{ steps.get_version.outputs.version }}

This is an automated PR created by the documentation update workflow.
branch: update-docs-${{ steps.get_version.outputs.version }}
base: main
delete-branch: true
labels: |
documentation
automated-pr

- name: Skip PR creation (branch exists)
if: steps.check_branch.outputs.branch_exists == 'true'
run: |
echo "✅ Documentation for version ${{ steps.get_version.outputs.version }} has already been updated."
echo "Branch update-docs-${{ steps.get_version.outputs.version }} already exists."
echo "Workflow completed successfully - no action needed."
2 changes: 1 addition & 1 deletion .github/workflows/updatecli-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
packages: read
pull-requests: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
Expand Down