Skip to content

Commit 5d96182

Browse files
committed
fix fail due to diff having been already commited and dont push stder into diff file
1 parent 2d54558 commit 5d96182

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/weekly-api-diff.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: yarn build:api-published
3535

3636
- name: Generate diff
37-
run: yarn compare:apis --isCI > /tmp/diff-current.txt 2>&1 || true
37+
run: yarn compare:apis --isCI > /tmp/diff-current.txt || true
3838

3939
# Check out snapshots repo so we can read the previous diff and commit the new one
4040
- uses: actions/checkout@v4
@@ -63,8 +63,7 @@ jobs:
6363
git config user.email "github-actions@github.com"
6464
git config user.name "GitHub Actions"
6565
git add diffs/$TODAY.txt
66-
git commit -m "weekly api diff $TODAY"
67-
git push
66+
git diff --cached --quiet || (git commit -m "weekly api diff $TODAY" && git push)
6867
fi
6968
7069
# Summarize with GitHub Models (free via GITHUB_TOKEN) and post to Slack

0 commit comments

Comments
 (0)