diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2025-10-07 20:33:01 -0700 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2025-10-07 20:33:02 -0700 |
| commit | d4a762e005503347ffdafb274ecbf02879763149 (patch) | |
| tree | 78fb458470241223fec20ef7f8c1ae30652f6929 | |
| parent | 68e03213271f44ae63ad4a4e1ebe3ed59d589a9c (diff) | |
check_misc.yml: Support non-master branches
See also: https://github.com/ruby/git.ruby-lang.org/commit/0b0eae90f67e9889b133b86b1f2e4526a2882161
| -rw-r--r-- | .github/workflows/check_misc.yml | 9 |
1 files 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: |
