Skip to content

Commit 607051e

Browse files
mergify[bot]pazone
andauthored
[CI] Fix post-dependabot commit step conditionals (#5321) (#5326)
(cherry picked from commit 3349a8f) Co-authored-by: Pavel Zorin <pavel.zorin@elastic.co>
1 parent 4e74505 commit 607051e

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/post-dependabot.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: post-dependabot
77
on:
88
push:
99
branches:
10-
- 'dependabot/go_modules/**'
10+
- "dependabot/go_modules/**"
1111

1212
jobs:
1313
update-notice:
@@ -31,7 +31,12 @@ jobs:
3131

3232
- name: check for modified NOTICE.txt
3333
id: notice-check
34-
run: echo "modified=$(if git diff-index --quiet HEAD -- NOTICE.txt; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT
34+
run: |
35+
if git diff --quiet HEAD -- NOTICE.txt; then
36+
echo "modified=false" >> $GITHUB_OUTPUT
37+
else
38+
echo "modified=true" >> $GITHUB_OUTPUT
39+
fi
3540
3641
- name: commit NOTICE.txt
3742
if: steps.notice-check.outputs.modified == 'true'
@@ -44,11 +49,16 @@ jobs:
4449
git push
4550
4651
- name: update otel README.md
47-
run: mage otel:readme
52+
run: mage otel:readme
4853

4954
- name: check for modified otel README.md
5055
id: otel-readme-check
51-
run: echo "modified=$(if git diff-index --quiet HEAD -- internal/pkg/otel/README.md; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT
56+
run: |
57+
if git diff --quiet HEAD -- internal/pkg/otel/README.md; then
58+
echo "modified=false" >> $GITHUB_OUTPUT
59+
else
60+
echo "modified=true" >> $GITHUB_OUTPUT
61+
fi
5262
5363
- name: commit otel README.md
5464
if: steps.otel-readme-check.outputs.modified == 'true'

0 commit comments

Comments
 (0)