Skip to content

Commit 54f7a36

Browse files
theletterfshainaraskasv1v
authored
UpdateCLI scripts for versions.yml (#1602)
* First PR * Add sources * Peer edits * Add stack target * Add negative * Update versions.yml * Remove ECE * Replace stack version detection * Avoid anchor problem with stack * Update versions.yml * Update updatecli/updatecli.d/versions.yml Co-authored-by: shainaraskas <[email protected]> * Update updatecli.yml * Update updatecli/updatecli.d/versions.yml Co-authored-by: Victor Martinez <[email protected]> --------- Co-authored-by: shainaraskas <[email protected]> Co-authored-by: Victor Martinez <[email protected]>
1 parent ccdfef0 commit 54f7a36

File tree

3 files changed

+522
-0
lines changed

3 files changed

+522
-0
lines changed

.github/workflows/updatecli.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: updatecli
3+
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "0 5 * * 1-5"
8+
9+
permissions:
10+
contents: read
11+
12+
env:
13+
JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
14+
15+
jobs:
16+
bump:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Get token
22+
id: get_token
23+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
24+
with:
25+
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
26+
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
27+
permissions: >-
28+
{
29+
"contents": "write",
30+
"pull_requests": "write"
31+
}
32+
repositories: >-
33+
["docs-builder"]
34+
35+
- uses: elastic/oblt-actions/updatecli/run@v1
36+
with:
37+
command: apply --config updatecli/updatecli.d/versions.yml --values updatecli/values.d/scm.yml
38+
env:
39+
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
40+
41+
- if: ${{ failure() }}
42+
uses: elastic/oblt-actions/slack/send@v1
43+
with:
44+
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
45+
channel-id: "#docs-team"
46+
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, please look what's going on <${{ env.JOB_URL }}|here>"

0 commit comments

Comments
 (0)