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

[ci] also split steps for auto-regen workflow #525

Merged
merged 1 commit into from
Jan 28, 2025
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
10 changes: 7 additions & 3 deletions .github/workflows/auto-regenerate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,16 @@ jobs:
run: "composer dump-autoload"

- name: "Regenerate files"
id: regen
run: "./safe.php generate && git diff --exit-code && (echo regen=no-diff >> $GITHUB_OUTPUT) || (echo regen=diff >> $GITHUB_OUTPUT)"
run: "./safe.php generate"
working-directory: "generator"

- name: "Check for differences"
id: diff
run: "git diff --exit-code && (echo diff=no-diff >> $GITHUB_OUTPUT) || (echo diff=diff >> $GITHUB_OUTPUT)"
working-directory: "generator"

- name: "Create a pr if the files are different"
if: "${{ steps.regen.outputs.regen == 'diff' }}"
if: "${{ steps.diff.outputs.diff == 'diff' }}"
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Automatically regenerate the files"
Expand Down