Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 8.5] Minor generation workflow bugfix #2194

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ defaults:
jobs:
build:
runs-on: ubuntu-latest
# The actor check currently does not work. The `secrets.PAT` belongs to `delvedor` and not
# `elasticmachine`. We should make sure to change this in the future.
if: github.repository_owner == 'elastic' && github.actor != 'elasticmachine'
steps:
- name: Checkout
Expand Down Expand Up @@ -51,7 +53,7 @@ jobs:
- name: Check for Changed Files
id: changes
run: |
if [ -n "$(git status --porcelain)" ]; then
if [ -n "$(git status --porcelain ./output)" ]; then
echo "has-changes=1" >> $GITHUB_OUTPUT
fi

Expand All @@ -64,13 +66,8 @@ jobs:
- name: Push Output
if: steps.changes.outputs.has-changes == '1'
run: |
cd ./output

git add -A
git add -A ./output
git commit -m "Update specification output"

git status

git push

# For debugging purposes:
Expand All @@ -79,14 +76,9 @@ jobs:
# env:
# BRANCH_NAME: output_${{ github.run_id }}_${{ github.run_attempt }}
# run: |
# cd ./output

# git fetch
# git switch main

# git add -A
# git add -A ./output
# git commit -m "Update specification output"

# git status

# git push origin HEAD:refs/heads/${{ env.BRANCH_NAME }}
Loading