File tree Expand file tree Collapse file tree 3 files changed +88
-0
lines changed Expand file tree Collapse file tree 3 files changed +88
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : update specs
3
+
4
+ scms :
5
+ githubConfig :
6
+ kind : github
7
+ spec :
8
+ user : ' {{ requiredEnv "GIT_USER" }}'
9
+ email : ' {{ requiredEnv "GIT_EMAIL" }}'
10
+ owner : elastic
11
+ repository : ecs-logging-ruby
12
+ token : ' {{ requiredEnv "GITHUB_TOKEN" }}'
13
+ username : ' {{ requiredEnv "GIT_USER" }}'
14
+ branch : main
15
+
16
+ actions :
17
+ ecs-logging-ruby :
18
+ kind : github/pullrequest
19
+ scmid : githubConfig
20
+ sourceid : sha
21
+ spec :
22
+ automerge : false
23
+ labels :
24
+ - dependencies
25
+ title : ' synchronize ecs-logging spec'
26
+ description : |-
27
+ ### What
28
+
29
+ ECS logging specs automatic sync
30
+
31
+ ### Why
32
+
33
+ *Changeset*
34
+ * https://github.com/elastic/ecs-logging/commit/{{ source "sha" }}
35
+
36
+ sources :
37
+ spec.json :
38
+ name : Get specs from json
39
+ kind : file
40
+ spec :
41
+ file : https://raw.githubusercontent.com/elastic/ecs-logging/main/spec/spec.json
42
+
43
+ sha :
44
+ name : Get commit
45
+ kind : json
46
+ spec :
47
+ file : ' https://api.github.com/repos/elastic/ecs-logging/commits?path=spec%2Fspec.json&page=1&per_page=1'
48
+ key : " .[0].sha"
49
+
50
+ targets :
51
+ spec.json-update :
52
+ name : ' synchronize ecs-logging spec'
53
+ kind : file
54
+ sourceid : spec.json
55
+ scmid : githubConfig
56
+ spec :
57
+ file : spec/fixtures/spec/spec.json
Original file line number Diff line number Diff line change 6
6
workflows :
7
7
- test
8
8
- test-reporter
9
+ - update-specs
9
10
types : [completed]
10
11
11
12
jobs :
Original file line number Diff line number Diff line change
1
+ ---
2
+ # Send PRs to the subscribed ECS Agents if the spec files (JSON) are modified
3
+ name : update-specs
4
+
5
+ on :
6
+ workflow_dispatch :
7
+ schedule :
8
+ - cron : ' 0 6 * * *'
9
+
10
+ permissions :
11
+ pull-requests : write
12
+ contents : write
13
+
14
+ jobs :
15
+ bump :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+
19
+ - uses : actions/checkout@v3
20
+
21
+ - name : Setup Git
22
+ uses : elastic/apm-pipeline-library/.github/actions/setup-git@current
23
+
24
+ - name : Install Updatecli in the runner
25
+ uses : updatecli/updatecli-action@453502948b442d7b9a923de7b40cc7ce8628505c
26
+
27
+ - name : Run Updatecli
28
+ env :
29
+ GITHUB_TOKEN : ${{ github.token }}
30
+ run : updatecli apply --config ./.github/update-specs.yml
You can’t perform that action at this time.
0 commit comments