Skip to content

Commit 656080d

Browse files
Minor generation workflow bugfix (#2187) (#2198)
Co-authored-by: Florian Bernd <[email protected]>
1 parent d60d635 commit 656080d

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

.github/workflows/generate.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ defaults:
2424
jobs:
2525
build:
2626
runs-on: ubuntu-latest
27+
# The actor check currently does not work. The `secrets.PAT` belongs to `delvedor` and not
28+
# `elasticmachine`. We should make sure to change this in the future.
2729
if: github.repository_owner == 'elastic' && github.actor != 'elasticmachine'
2830
steps:
2931
- name: Checkout
@@ -51,7 +53,7 @@ jobs:
5153
- name: Check for Changed Files
5254
id: changes
5355
run: |
54-
if [ -n "$(git status --porcelain)" ]; then
56+
if [ -n "$(git status --porcelain ./output)" ]; then
5557
echo "has-changes=1" >> $GITHUB_OUTPUT
5658
fi
5759
@@ -64,13 +66,8 @@ jobs:
6466
- name: Push Output
6567
if: steps.changes.outputs.has-changes == '1'
6668
run: |
67-
cd ./output
68-
69-
git add -A
69+
git add -A ./output
7070
git commit -m "Update specification output"
71-
72-
git status
73-
7471
git push
7572
7673
# For debugging purposes:
@@ -79,14 +76,9 @@ jobs:
7976
# env:
8077
# BRANCH_NAME: output_${{ github.run_id }}_${{ github.run_attempt }}
8178
# run: |
82-
# cd ./output
83-
8479
# git fetch
8580
# git switch main
8681

87-
# git add -A
82+
# git add -A ./output
8883
# git commit -m "Update specification output"
89-
90-
# git status
91-
9284
# git push origin HEAD:refs/heads/${{ env.BRANCH_NAME }}

0 commit comments

Comments
 (0)