From c78117a2fd6d91a7982c6fcb627a3278fead007d Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 28 May 2024 15:17:33 +0200 Subject: [PATCH] ci: use updatecli with GitHub secrets --- .ci/bump-version.yml | 7 +++---- .github/workflows/bump-version.yml | 16 +++++++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.ci/bump-version.yml b/.ci/bump-version.yml index 138cf23..c576dba 100644 --- a/.ci/bump-version.yml +++ b/.ci/bump-version.yml @@ -9,12 +9,11 @@ scms: githubConfig: kind: github spec: - user: '{{ requiredEnv "GIT_USER" }}' - email: '{{ requiredEnv "GIT_EMAIL" }}' + user: '{{ requiredEnv "GITHUB_ACTOR" }}' owner: elastic repository: opbeans-python token: '{{ requiredEnv "GITHUB_TOKEN" }}' - username: '{{ requiredEnv "GIT_USER" }}' + username: '{{ requiredEnv "GITHUB_ACTOR" }}' branch: main actions: @@ -35,7 +34,7 @@ sources: owner: elastic repository: apm-agent-python token: '{{ requiredEnv "GITHUB_TOKEN" }}' - username: '{{ requiredEnv "GIT_USER" }}' + username: '{{ requiredEnv "GITHUB_ACTOR" }}' versionfilter: kind: semver transformers: diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 7afa0a2..01b56fa 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -16,9 +16,15 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: elastic/apm-pipeline-library/.github/actions/updatecli@current + - uses: elastic/oblt-actions/updatecli/run@v1 with: - vaultUrl: ${{ secrets.VAULT_ADDR }} - vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} - vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} - pipeline: ./.ci/bump-version.yml + command: "apply --config .ci/bump-version.yml" + env: + GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }} + + - if: failure() + uses: elastic/oblt-actions/slack/send@v1 + with: + bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + channel-id: "#apm-agent-python" + message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on "