Skip to content

Commit

Permalink
ci: use updatecli with GitHub secrets (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored May 28, 2024
1 parent 0d8d858 commit df6811f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .ci/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ scms:
githubConfig:
kind: github
spec:
user: '{{ requiredEnv "GIT_USER" }}'
email: '{{ requiredEnv "GIT_EMAIL" }}'
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
owner: elastic
repository: opbeans-frontend
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
username: '{{ requiredEnv "GIT_USER" }}'
username: '{{ requiredEnv "GITHUB_ACTOR" }}'
branch: main
commitusingapi: true

actions:
opbeans-frontend:
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7.3'
- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current

- uses: elastic/oblt-actions/updatecli/run@v1
with:
command: "--experimental apply --config .ci/bump-version.yml"
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}

- if: failure()
uses: elastic/oblt-actions/slack/send@v1
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/bump-version.yml
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: "#apm-agent-js"
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>"

0 comments on commit df6811f

Please sign in to comment.