diff --git a/.github/workflows/schemas.yml b/.github/workflows/schemas.yml index 8f3e48dd..542e4953 100644 --- a/.github/workflows/schemas.yml +++ b/.github/workflows/schemas.yml @@ -2,7 +2,8 @@ name: 📄 Schemas on: push: - branches: [main, "release-plz-*"] + branches: [main, "bgins/run-schemas-*"] + # branches: [main, "release-plz-*"] # branches: [main, "**"] permissions: @@ -68,9 +69,30 @@ 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: ${{ steps.git-check-schemas.outputs.modified == 'true' || steps.git-check-manifest.outputs.modified == 'true' }} + # (github.ref_name == 'bgins/run-schemas-*' && 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