Resurrect sync from GitHub to git.ruby-lang.org (#14765)

This commit is contained in:
Takashi Kokubun 2025-10-07 17:12:01 -07:00 committed by GitHub
parent 5a9aa9013f
commit b05d64aa50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,6 +35,18 @@ jobs:
if: ${{ github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
continue-on-error: true # The next auto-style should always run
# Sync git.ruby-lang.org before pushing new commits to avoid duplicated syncs
- name: Sync git.ruby-lang.org
env:
RUBY_GIT_SYNC_PRIVATE_KEY: ${{ secrets.RUBY_GIT_SYNC_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh
echo "$RUBY_GIT_SYNC_PRIVATE_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -t ed25519 git.ruby-lang.org >> ~/.ssh/known_hosts
ssh -i ~/.ssh/id_ed25519 git-sync@git.ruby-lang.org 'sudo -u git /home/git/git.ruby-lang.org/bin/update-ruby.sh'
if: ${{ github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
- uses: ./.github/actions/setup/directories
with:
makeup: true