From d4a762e005503347ffdafb274ecbf02879763149 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 7 Oct 2025 20:33:01 -0700 Subject: check_misc.yml: Support non-master branches See also: https://github.com/ruby/git.ruby-lang.org/commit/0b0eae90f67e9889b133b86b1f2e4526a2882161 --- .github/workflows/check_misc.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check_misc.yml b/.github/workflows/check_misc.yml index 67a350db1c..6638b0ec87 100644 --- a/.github/workflows/check_misc.yml +++ b/.github/workflows/check_misc.yml @@ -37,15 +37,16 @@ jobs: # 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 master' - if: ${{ github.repository == 'ruby/ruby' && github.ref == 'refs/heads/master' && github.event_name == 'push' }} + ssh -i ~/.ssh/id_ed25519 git-sync@git.ruby-lang.org "sudo -u git /home/git/git.ruby-lang.org/bin/update-ruby.sh $GITHUB_REF" + env: + GITHUB_REF: ${{ github.ref }} + RUBY_GIT_SYNC_PRIVATE_KEY: ${{ secrets.RUBY_GIT_SYNC_PRIVATE_KEY }} + if: ${{ github.repository == 'ruby/ruby' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/ruby_')) && github.event_name == 'push' }} - uses: ./.github/actions/setup/directories with: -- cgit v1.2.3