Skip to content

Commit

Permalink
chore: Add release-plz schema action run
Browse files Browse the repository at this point in the history
  • Loading branch information
bgins committed Mar 1, 2024
1 parent 8fb03c3 commit 8d73246
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 📄 Schemas

on:
push:
branches: [main]
branches: [main, "release-plz-*"]
# branches: [main, "**"]

permissions:
Expand All @@ -26,6 +26,7 @@ jobs:
- 'homestar-runtime/src/**'
- 'homestar-schemas/src/**'
- 'homestar-workflow/src/**'
- 'Cargo.toml'
schemas:
needs: changes
Expand Down Expand Up @@ -58,12 +59,17 @@ jobs:
run: cargo run -p homestar-schemas

- name: Check for modified schemas
id: git-check
id: git-check-schemas
shell: bash
run: echo modified=$(if [[ $(git diff homestar-runtime/schemas/) ]]; then echo "true"; else echo "false"; fi) >> $GITHUB_OUTPUT

- name: Check for updated version
id: git-check-manifest
shell: bash
run: echo modified=$(if [[ $(git diff Cargo.toml) ]]; then echo "true"; else echo "false"; fi) >> $GITHUB_OUTPUT

- name: Push changes
if: steps.git-check.outputs.modified == 'true'
if: ${{ steps.git-check-schemas.outputs.modified == 'true' || steps.git-check-manifest.outputs.modified == 'true' }}
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
Expand Down

0 comments on commit 8d73246

Please sign in to comment.