Skip to content

Commit

Permalink
Fix if check before setting is_valid=true in validate.yml (Fixes #49)
Browse files Browse the repository at this point in the history
  • Loading branch information
MelissaAutumn committed Dec 16, 2024
1 parent 3c74806 commit de5d0a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/convert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ jobs:
- uses: actions/checkout@v4

- name: Check for validation success and file changes
env:
IS_VALID: ${{ needs.validate_json.outputs.is_valid }}
run: |
if [ "${{ needs.validate_json.outputs.is_valid }}" != "true" ]; then
if [ ${IS_VALID} != "true" ]; then
echo "JSON is not valid. Skipping commit."
echo "NO_COMMIT=true" >> $GITHUB_ENV
elif git diff --quiet; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ jobs:

- name: Save state
id: save_state
if: steps.validate_json.conclusion == 'success'
if: ${{ success() }}
run: echo "is_valid=true" >> $GITHUB_OUTPUT

0 comments on commit de5d0a6

Please sign in to comment.