summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorTakashi Kokubun <takashi.kokubun@shopify.com>2025-10-07 17:12:01 -0700
committerGitHub <noreply@github.com>2025-10-07 17:12:01 -0700
commitb05d64aa501ecfe321443ed7e5f246dd88abf01e (patch)
tree780a49eb70ee61ced51c17c1d4fb54531732c844 /.github
parent5a9aa9013ffa3e1457d8aca606313f8ee4742399 (diff)
Resurrect sync from GitHub to git.ruby-lang.org (#14765)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/check_misc.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/.github/workflows/check_misc.yml b/.github/workflows/check_misc.yml
index 07c43a0c3b..1bb6592423 100644
--- a/.github/workflows/check_misc.yml
+++ b/.github/workflows/check_misc.yml
@@ -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