From a34220a8cf7073967aaf037107dc0b0202ecf929 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 15 Jan 2024 11:41:19 +0100 Subject: [PATCH 1/2] docs(apm-server): update golang version in version.asciidoc --- .github/CODEOWNERS | 2 ++ .github/updatecli.d/bump-golang.yml | 42 +++++++++++++++++++++++++++++ .github/workflows/bump-golang.yml | 22 +++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 .github/updatecli.d/bump-golang.yml create mode 100644 .github/workflows/bump-golang.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ee1ff064a7..8ef0fd08c5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,3 +3,5 @@ # For more info, see https://help.github.com/articles/about-codeowners/ * @elastic/obs-docs + +/docs/en/observability/apm/version.asciidoc @elastic/apm-server \ No newline at end of file diff --git a/.github/updatecli.d/bump-golang.yml b/.github/updatecli.d/bump-golang.yml new file mode 100644 index 0000000000..7b71f93ce1 --- /dev/null +++ b/.github/updatecli.d/bump-golang.yml @@ -0,0 +1,42 @@ +--- +name: Bump golang version to latest version in the APM Server docs. +pipelineid: 'updatecli-bump-golang' + +actions: + default: + title: '[updatecli] Bump Golang version to {{ source "latestGoVersion" }}' + kind: github/pullrequest + scmid: default + spec: + description: |- + ### What + Bump go release version with the latest available version in https://github.com/elastic/apm-server + +scms: + default: + kind: github + spec: + user: '{{ requiredEnv "GIT_USER" }}' + email: '{{ requiredEnv "GIT_EMAIL" }}' + owner: elastic + repository: observability-docs + token: '{{ requiredEnv "GITHUB_TOKEN" }}' + username: '{{ requiredEnv "GIT_USER" }}' + branch: main + +sources: + latestGoVersion: + kind: file + spec: + file: https://raw.githubusercontent.com/elastic/apm-server/main/.go-version + +targets: + update-version-asciidoc: + name: 'Update version.asciidoc with Golang version {{ source "latestGoVersion" }}' + sourceid: latestGoVersion + scmid: default + kind: file + spec: + file: docs/en/observability/apm/version.asciidoc + matchpattern: '(:go-version:) \d+.\d+.\d+' + replacepattern: '$1 {{ source "latestGoVersion" }}' diff --git a/.github/workflows/bump-golang.yml b/.github/workflows/bump-golang.yml new file mode 100644 index 0000000000..af181161f8 --- /dev/null +++ b/.github/workflows/bump-golang.yml @@ -0,0 +1,22 @@ +--- +name: bump-golang + +on: + workflow_dispatch: + schedule: + - cron: '0 20 * * 6' + +permissions: + contents: read + +jobs: + bump: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: elastic/apm-pipeline-library/.github/actions/updatecli@current + with: + vaultUrl: ${{ secrets.VAULT_ADDR }} + vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} + vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} + pipeline: ./.github/updatecli.d/bump-golang.yml \ No newline at end of file From 97fe40e8fa4020bb8155b87992df7b98fcae6b1f Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 15 Jan 2024 11:46:25 +0100 Subject: [PATCH 2/2] run more often --- .github/workflows/bump-golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bump-golang.yml b/.github/workflows/bump-golang.yml index af181161f8..99e3e9af4b 100644 --- a/.github/workflows/bump-golang.yml +++ b/.github/workflows/bump-golang.yml @@ -4,7 +4,7 @@ name: bump-golang on: workflow_dispatch: schedule: - - cron: '0 20 * * 6' + - cron: '0 3 * * 1-6' permissions: contents: read