Skip to content

Commit

Permalink
chore: Run release-plz on version changes only
Browse files Browse the repository at this point in the history
  • Loading branch information
bgins committed Mar 4, 2024
1 parent 8d73246 commit 17b27c6
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: 📄 Schemas

on:
push:
branches: [main, "release-plz-*"]
branches: [main, "bgins/run-schemas-*"]
# branches: [main, "release-plz-*"]
# branches: [main, "**"]

permissions:
Expand Down Expand Up @@ -68,9 +69,25 @@ jobs:
shell: bash
run: echo modified=$(if [[ $(git diff Cargo.toml) ]]; then echo "true"; else echo "false"; fi) >> $GITHUB_OUTPUT

- name: Echo results
run: |
echo Manifest version updated:
echo ${{ steps.git-check-manifest.outputs.modified }}
echo Schemas updated:
echo ${{ steps.git-check-schemas.outputs.modified }}
echo Branch starts with bgins/run-schemas:
echo ${{ startsWith(github.ref_name, 'bgins/run-schemas') }}
echo Check main condition:
echo ${{ (github.ref_name == 'main' && (steps.git-check-schemas.outputs.modified == 'true' || steps.git-check-manifest.outputs.modified == 'true')) }}
echo Check branch condition:
echo ${{ (startsWith(github.ref_name, 'bgins/run-schemas') && steps.git-check-manifest.outputs.modified == 'true') }}
echo Check entire condition:
echo ${{ (github.ref_name == 'main' && (steps.git-check-schemas.outputs.modified == 'true' || steps.git-check-manifest.outputs.modified == 'true')) || (startsWith(github.ref_name, 'bgins/run-schemas') && steps.git-check-manifest.outputs.modified == 'true') }}
- name: Push changes
if: ${{ steps.git-check-schemas.outputs.modified == 'true' || steps.git-check-manifest.outputs.modified == 'true' }}
if: (github.ref_name == 'main' && (steps.git-check-schemas.outputs.modified == 'true' || steps.git-check-manifest.outputs.modified == 'true')) || (startsWith(github.ref_name, 'bgins/run-schemas') && steps.git-check-manifest.outputs.modified == 'true')
run: |
echo RUNNING
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
Expand Down

0 comments on commit 17b27c6

Please sign in to comment.