From 6fb7f9e95a021e7881249fad00f3d79cfe74e8c0 Mon Sep 17 00:00:00 2001 From: Kirill Chernakov Date: Tue, 1 Jul 2025 12:14:47 +0400 Subject: [PATCH 1/2] fix: git add schema.json and `--cached` to detect if schema does not yet exist --- .github/workflows/release-workflow-schema.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-workflow-schema.yml b/.github/workflows/release-workflow-schema.yml index 1767a41d89..11d3ded164 100644 --- a/.github/workflows/release-workflow-schema.yml +++ b/.github/workflows/release-workflow-schema.yml @@ -120,10 +120,11 @@ jobs: id: check_changes working-directory: schema-repo run: | - if git diff --quiet schema.json; then - echo "changed=false" >> $GITHUB_OUTPUT + git add schema.json + if git diff --cached --quiet schema.json; then + echo "changed=false" else - echo "changed=true" >> $GITHUB_OUTPUT + echo "changed=true" fi - name: Commit and push schema @@ -132,7 +133,6 @@ jobs: run: | git config user.name "Keep Schema Bot" git config user.email "no-reply@keephq.dev" - git add schema.json git commit -m "Release schema v${{ steps.get_version.outputs.version }}" git push origin ${{ steps.set_branch.outputs.branch }} if [ "${{ steps.set_branch.outputs.branch }}" = "main" ]; then From e2a40217ccd16cd14d7b9d6afe8aba9e093a035b Mon Sep 17 00:00:00 2001 From: Kirill Chernakov Date: Tue, 1 Jul 2025 13:49:02 +0400 Subject: [PATCH 2/2] fix: missing >> $GITHUB_OUTPUT --- .github/workflows/release-workflow-schema.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-workflow-schema.yml b/.github/workflows/release-workflow-schema.yml index 11d3ded164..14adc80d7b 100644 --- a/.github/workflows/release-workflow-schema.yml +++ b/.github/workflows/release-workflow-schema.yml @@ -122,9 +122,9 @@ jobs: run: | git add schema.json if git diff --cached --quiet schema.json; then - echo "changed=false" + echo "changed=false" >> $GITHUB_OUTPUT else - echo "changed=true" + echo "changed=true" >> $GITHUB_OUTPUT fi - name: Commit and push schema