@@ -20,59 +20,22 @@ jobs:
2020 steps :
2121 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2222 with :
23- fetch-depth : 100 # for notify-slack-commits
2423 token : ${{ (github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull')) && secrets.MATZBOT_AUTO_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
2524
26- # Run this step first (even before `make up` in the next step) to make the notification available before any other failure
27- - name : Notify commit to Slack
28- run : ruby tool/notify-slack-commits.rb "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA" refs/heads/master
29- env :
30- GITHUB_OLD_SHA : ${{ github.event.before }}
31- GITHUB_NEW_SHA : ${{ github.event.after }}
32- SLACK_WEBHOOK_URL_ALERTS : ${{ secrets.SLACK_WEBHOOK_URL_ALERTS }}
33- SLACK_WEBHOOK_URL_COMMITS : ${{ secrets.SLACK_WEBHOOK_URL_COMMITS }}
34- SLACK_WEBHOOK_URL_RUBY_JP : ${{ secrets.SLACK_WEBHOOK_URL_RUBY_JP }}
35- if : ${{ github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
36- continue-on-error : true # The next auto-style should always run
37-
38- # Sync git.ruby-lang.org before pushing new commits to avoid duplicated syncs
39- - name : Sync git.ruby-lang.org
40- run : |
41- mkdir -p ~/.ssh
42- echo "$RUBY_GIT_SYNC_PRIVATE_KEY" > ~/.ssh/id_ed25519
43- chmod 600 ~/.ssh/id_ed25519
44- ssh-keyscan -t ed25519 git.ruby-lang.org >> ~/.ssh/known_hosts
45- ssh -i ~/.ssh/id_ed25519 [email protected] "sudo -u git /home/git/git.ruby-lang.org/bin/update-ruby.sh $GITHUB_REF" 46- env :
47- GITHUB_REF : ${{ github.ref }}
48- RUBY_GIT_SYNC_PRIVATE_KEY : ${{ secrets.RUBY_GIT_SYNC_PRIVATE_KEY }}
49- if : ${{ github.repository == 'ruby/ruby' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/ruby_')) && github.event_name == 'push' }}
50-
5125 - uses : ./.github/actions/setup/directories
5226 with :
5327 makeup : true
5428 # Skip overwriting MATZBOT_AUTO_UPDATE_TOKEN
5529 checkout : ' ' # false (ref: https://github.com/actions/runner/issues/2238)
5630
57- # Run this step early to make sure auto-style commits are pushed
58- - name : Auto-correct code styles
59- run : |
60- set -x
61- ruby tool/auto-style.rb "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA" refs/heads/master
62- env :
63- GITHUB_OLD_SHA : ${{ github.event.before }}
64- GITHUB_NEW_SHA : ${{ github.event.after }}
65- GIT_AUTHOR_NAME : git
66- GIT_COMMITTER_NAME : git
67- 68- if : ${{ github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
6931 - name : Check for code styles
7032 run : |
7133 set -x
7234 ruby tool/auto-style.rb "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA"
7335 env :
7436 GITHUB_OLD_SHA : ${{ github.event.pull_request.base.sha }}
7537 GITHUB_NEW_SHA : ${{ github.event.pull_request.merge_commit_sha }}
38+ # Skip 'push' events because post_push.yml fixes them on push
7639 if : ${{ github.repository == 'ruby/ruby' && startsWith(github.event_name, 'pull') }}
7740
7841 - name : Check if C-sources are US-ASCII
@@ -145,17 +108,6 @@ jobs:
145108 name : ${{ steps.docs.outputs.htmlout }}
146109 if : ${{ steps.docs.outcome == 'success' }}
147110
148- - name : Push PR notes to GitHub
149- run : ruby tool/notes-github-pr.rb "$(pwd)/.git" "$GITHUB_OLD_SHA" "$GITHUB_NEW_SHA" refs/heads/master
150- env :
151- GITHUB_OLD_SHA : ${{ github.event.before }}
152- GITHUB_NEW_SHA : ${{ github.event.after }}
153- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
154- GIT_AUTHOR_NAME : git
155- GIT_COMMITTER_NAME : git
156- 157- if : ${{ github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
158-
159111 - uses : ./.github/actions/slack
160112 with :
161113 SLACK_WEBHOOK_URL : ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
0 commit comments