Skip to content

Commit 1ef0d68

Browse files
authored
ci: use updatecli with GitHub secrets (#255)
1 parent b2374be commit 1ef0d68

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.ci/update-specs.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ scms:
55
githubConfig:
66
kind: github
77
spec:
8-
user: '{{ requiredEnv "GIT_USER" }}'
9-
email: '{{ requiredEnv "GIT_EMAIL" }}'
8+
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
109
owner: elastic
1110
repository: ecs-logging-java
1211
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
13-
username: '{{ requiredEnv "GIT_USER" }}'
12+
username: '{{ requiredEnv "GITHUB_ACTOR" }}'
1413
branch: main
1514

1615
actions:

.github/workflows/update-specs.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717

18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919

20-
- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current
20+
- uses: elastic/oblt-actions/updatecli/run@v1
2121
with:
22-
vaultUrl: ${{ secrets.VAULT_ADDR }}
23-
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
24-
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
25-
pipeline: ./.ci/update-specs.yml
22+
command: "apply --config .ci/update-specs.yml"
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
25+
26+
- if: failure()
27+
uses: elastic/oblt-actions/slack/send@v1
28+
with:
29+
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
30+
channel-id: "#apm-agent-java"
31+
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 commit comments

Comments
 (0)