Skip to content

Commit

Permalink
Minor generation workflow bugfix (#2187)
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd authored and github-actions[bot] committed Jul 17, 2023
1 parent fcbb85f commit 12aac68
Showing 1 changed file with 5 additions and 13 deletions.
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 }}

0 comments on commit 12aac68

Please sign in to comment.