Skip to content

Commit f56d066

Browse files
committed
Remove correct file
1 parent 7a35ba4 commit f56d066

File tree

2 files changed

+87
-57
lines changed

2 files changed

+87
-57
lines changed

.github/workflows/generate-report.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/generate.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Generate Output
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
- '7.17'
8+
- '8.[0-9]+'
9+
- '9.[0-9]+'
10+
11+
# For debugging purposes:
12+
# pull_request:
13+
# types: [opened, synchronize, reopened]
14+
# branches:
15+
# - main
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: false
20+
21+
defaults:
22+
run:
23+
shell: bash
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
# The actor check currently does not work. The `secrets.PAT` belongs to `delvedor` and not
29+
# `elasticmachine`. We should make sure to change this in the future.
30+
if: github.repository_owner == 'elastic' && github.actor != 'elasticmachine'
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
with:
35+
token: ${{ secrets.PAT }}
36+
persist-credentials: true
37+
38+
- name: Setup Node 22
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: 22
42+
cache: npm
43+
cache-dependency-path: '**/package-lock.json'
44+
45+
- name: Setup Dependencies
46+
run: |
47+
make setup
48+
49+
- name: Generate Output
50+
run: |
51+
make compile
52+
make generate
53+
make transform-to-openapi
54+
make filter-for-serverless
55+
56+
- name: Check for Changed Files
57+
id: changes
58+
run: |
59+
if [ -n "$(git status --porcelain ./output)" ]; then
60+
echo "has-changes=1" >> $GITHUB_OUTPUT
61+
fi
62+
63+
- name: Set Git Identity
64+
if: steps.changes.outputs.has-changes == '1'
65+
run: |-
66+
git config --global user.email "[email protected]"
67+
git config --global user.name "Elastic Machine"
68+
69+
- name: Push Output
70+
if: steps.changes.outputs.has-changes == '1'
71+
run: |
72+
git add -A ./output
73+
git commit -m "Update specification output"
74+
git push
75+
76+
# For debugging purposes:
77+
# - name: Push Output
78+
# if: steps.changes.outputs.has-changes == '1'
79+
# env:
80+
# BRANCH_NAME: output_${{ github.run_id }}_${{ github.run_attempt }}
81+
# run: |
82+
# git fetch
83+
# git switch main
84+
85+
# git add -A ./output
86+
# git commit -m "Update specification output"
87+
# git push origin HEAD:refs/heads/${{ env.BRANCH_NAME }}

0 commit comments

Comments
 (0)