From 49a7d3299a9f7af3a12f5ab30254ca15741602da Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 28 May 2024 14:19:08 +0200 Subject: [PATCH] ci: use updatecli with GitHub secrets (#389) --- .github/update-specs.yml | 5 ++--- .github/workflows/update-specs.yml | 16 +++++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/update-specs.yml b/.github/update-specs.yml index e8007193..9a6ee711 100644 --- a/.github/update-specs.yml +++ b/.github/update-specs.yml @@ -5,12 +5,11 @@ scms: githubConfig: kind: github spec: - user: '{{ requiredEnv "GIT_USER" }}' - email: '{{ requiredEnv "GIT_EMAIL" }}' + user: '{{ requiredEnv "GITHUB_ACTOR" }}' owner: elastic repository: ecs-dotnet token: '{{ requiredEnv "GITHUB_TOKEN" }}' - username: '{{ requiredEnv "GIT_USER" }}' + username: '{{ requiredEnv "GITHUB_ACTOR" }}' branch: main actions: diff --git a/.github/workflows/update-specs.yml b/.github/workflows/update-specs.yml index c85463a1..bb8432ec 100644 --- a/.github/workflows/update-specs.yml +++ b/.github/workflows/update-specs.yml @@ -17,9 +17,15 @@ jobs: - 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: ./.github/update-specs.yml + command: "apply --config .github/update-specs.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-dotnet" + message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on "