Skip to content

Commit c9b4394

Browse files
authored
Merge pull request #1910 from habibayassin/gha-URfix
gha: update step output for update rules
2 parents 33d43e8 + 903a3e4 commit c9b4394

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/github-actions-update-rules.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,14 @@ jobs:
3838
run: |
3939
git config --local user.email "github-actions[bot]@users.noreply.github.com"
4040
git config --local user.name "github-actions[bot]"
41-
echo $(git status --porcelain)
42-
echo "has_update=$(git status --porcelain)" >> "$GITHUB_OUTPUT"
41+
if [ -n "$(git status --porcelain)" ]; then
42+
echo "has_update=true" >> "$GITHUB_OUTPUT"
43+
else
44+
echo "has_update=false" >> "$GITHUB_OUTPUT"
45+
fi
4346
git add .
4447
git commit -m "flow: update rules based on new golden reference"
45-
- if: "steps.remote-update.outputs.has_update != ''"
48+
- if: "steps.remote-update.outputs.has_update == 'true'"
4649
name: Create Draft PR
4750
uses: peter-evans/create-pull-request@v5
4851
with:

0 commit comments

Comments
 (0)