From 17c9544e31de701b6a7da75976d0dbb6db1a9feb Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Thu, 16 Feb 2023 15:08:10 +0100 Subject: [PATCH 1/2] Use composite action --- .github/workflows/update-specs.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/update-specs.yml b/.github/workflows/update-specs.yml index bbec8a1a2..b8d6cac33 100644 --- a/.github/workflows/update-specs.yml +++ b/.github/workflows/update-specs.yml @@ -6,23 +6,19 @@ on: - cron: '0 6 * * *' permissions: - pull-requests: write - contents: write + contents: read jobs: bump: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Setup Git - uses: elastic/apm-pipeline-library/.github/actions/setup-git@current - - name: Install Updatecli in the runner - uses: updatecli/updatecli-action@453502948b442d7b9a923de7b40cc7ce8628505c - - name: Run Updatecli - env: - GITHUB_TOKEN: ${{ github.token }} - BRANCH_NAME: ${{ github.ref_name }} - run: updatecli apply --config ./.ci/update-specs.yml + - 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: ./.ci/update-specs.yml - if: failure() uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current with: From 47cffb1c1c5cef7a5d17c7e37cadd205cb2032b0 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Thu, 16 Feb 2023 15:12:51 +0100 Subject: [PATCH 2/2] Add env --- .github/workflows/update-specs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/update-specs.yml b/.github/workflows/update-specs.yml index b8d6cac33..de06051bf 100644 --- a/.github/workflows/update-specs.yml +++ b/.github/workflows/update-specs.yml @@ -14,6 +14,8 @@ jobs: steps: - uses: actions/checkout@v3 - uses: elastic/apm-pipeline-library/.github/actions/updatecli@current + env: + BRANCH_NAME: ${{ github.ref_name }} with: vaultUrl: ${{ secrets.VAULT_ADDR }} vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}