Skip to content

Commit ab36bc7

Browse files
Update generate-schema.yml
1 parent b3b8a55 commit ab36bc7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/generate-schema.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
outputs:
1010
skip_job: ${{ steps.skip.outputs.skip_job }}
11+
skip_commit: ${{ steps.skip.outputs.skip_commit }}
1112
steps:
1213
- name: Checkout code
1314
uses: actions/checkout@v4
@@ -27,18 +28,20 @@ jobs:
2728
run: |
2829
regex="^refs/heads/brapi-V[0-9]+\.[0-9]+$"
2930
if [[ "${{ github.ref }}" =~ $regex ]]; then
30-
echo "commit=true" >> $GITHUB_ENV
31+
echo "skip_commit=false" >> $GITHUB_ENV
3132
else
32-
echo "commit=false" >> $GITHUB_ENV
33+
echo "skip_commit=true" >> $GITHUB_ENV
3334
fi
34-
echo "Release branch check - Will commit generated files? $commit"
35+
echo "Release branch check - Will skip commit of generated files? $skip_commit"
3536
generate:
3637
runs-on: ubuntu-latest
3738
needs: check
3839
if: needs.check.outputs.skip_job != 'true'
3940
steps:
4041
- name: debug
41-
run: echo ${{ needs.check.outputs.skip_job }}
42+
run: |
43+
echo ${{ needs.check.outputs.skip_job }}
44+
echo ${{ needs.check.outputs.skip_commit }}
4245
- name: Checkout code
4346
uses: actions/checkout@v4
4447
with:
@@ -72,5 +75,5 @@ jobs:
7275
- name: Compare OpenAPI
7376
working-directory: ./generator
7477
run: ./gradlew compareAll
75-
- if: env.commit == 'true'
78+
- if: needs.check.outputs.skip_commit == 'false'
7679
uses: stefanzweifel/git-auto-commit-action@v5

0 commit comments

Comments
 (0)