Skip to content

Commit b05d64a

Browse files
authored
Resurrect sync from GitHub to git.ruby-lang.org (#14765)
1 parent 5a9aa90 commit b05d64a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/check_misc.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ jobs:
3535
if: ${{ github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
3636
continue-on-error: true # The next auto-style should always run
3737

38+
# Sync git.ruby-lang.org before pushing new commits to avoid duplicated syncs
39+
- name: Sync git.ruby-lang.org
40+
env:
41+
RUBY_GIT_SYNC_PRIVATE_KEY: ${{ secrets.RUBY_GIT_SYNC_PRIVATE_KEY }}
42+
run: |
43+
mkdir -p ~/.ssh
44+
echo "$RUBY_GIT_SYNC_PRIVATE_KEY" > ~/.ssh/id_ed25519
45+
chmod 600 ~/.ssh/id_ed25519
46+
ssh-keyscan -t ed25519 git.ruby-lang.org >> ~/.ssh/known_hosts
47+
ssh -i ~/.ssh/id_ed25519 [email protected] 'sudo -u git /home/git/git.ruby-lang.org/bin/update-ruby.sh'
48+
if: ${{ github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
49+
3850
- uses: ./.github/actions/setup/directories
3951
with:
4052
makeup: true

0 commit comments

Comments
 (0)