Skip to content

Commit 88efe89

Browse files
committed
post_push.yml: Use continue-on-error for flaky steps
"Sync git.ruby-lang.org" and "Push PR notes to GitHub" steps can fail due to transient issues, which blocks execution of all subsequent steps. Use continue-on-error so the rest of the workflow still runs, and add a "Check for failures" step at the end to ensure the overall CI status is still red when either step fails. example: https://github.com/ruby/ruby/actions/runs/23825370964/job/69447008480 https://github.com/ruby/ruby/actions/runs/23671724888/job/68966478448
1 parent f6ddb9c commit 88efe89

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/post_push.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
if: ${{ github.repository == 'ruby/ruby' }}
1616
steps:
1717
- name: Sync git.ruby-lang.org
18+
id: sync-git
19+
continue-on-error: true
1820
run: |
1921
mkdir -p ~/.ssh
2022
(umask 066; printenv RUBY_GIT_SYNC_PRIVATE_KEY > ~/.ssh/id_ed25519)
@@ -73,6 +75,8 @@ jobs:
7375
if: ${{ github.ref == 'refs/heads/master' }}
7476

7577
- name: Push PR notes to GitHub
78+
id: pr-notes
79+
continue-on-error: true
7680
run: ruby tool/notes-github-pr.rb "$(pwd)/.git" "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA" refs/heads/master
7781
env:
7882
GITHUB_OLD_SHA: ${{ github.event.before }}
@@ -83,6 +87,10 @@ jobs:
8387
EMAIL: svn-admin@ruby-lang.org
8488
if: ${{ github.ref == 'refs/heads/master' }}
8589

90+
- name: Check for failures
91+
run: exit 1
92+
if: ${{ steps.sync-git.outcome == 'failure' || steps.pr-notes.outcome == 'failure' }}
93+
8694
- uses: ./.github/actions/slack
8795
with:
8896
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot

0 commit comments

Comments
 (0)