mirror of
https://github.com/ruby/ruby.git
synced 2026-10-29 00:46:26 +08:00
Bumps the github-actions group with 1 update in the / directory: [ruby/setup-ruby](https://github.com/ruby/setup-ruby). Updates `ruby/setup-ruby` from 1.334.0 to 1.335.0 - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/26e5b7d197ebf60545ee9667bcbace0be11ccaec...7f797815d8adceb1c412e7abefdd1ab4abc47a5f) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-version: 1.335.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
81 lines
2.6 KiB
YAML
81 lines
2.6 KiB
YAML
name: Sync default gems
|
|
|
|
env:
|
|
DEFAULT_GEM_SYNC_ENABLED: true
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
gem:
|
|
required: true
|
|
description: 'Name of the gem to be synchronized'
|
|
type: string
|
|
before:
|
|
required: true
|
|
description: 'Gem commit SHA before sync'
|
|
type: string
|
|
after:
|
|
required: true
|
|
description: 'Gem commit SHA after sync'
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
sync_default_gems:
|
|
name: Sync default gem ${{ github.event.inputs.gem }}
|
|
|
|
permissions:
|
|
contents: write # for Git to git push
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: ${{ github.repository == 'ruby/ruby' }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
name: Check out ruby/ruby
|
|
with:
|
|
token: ${{ github.repository == 'ruby/ruby' && secrets.MATZBOT_AUTO_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: ruby/setup-ruby@7f797815d8adceb1c412e7abefdd1ab4abc47a5f # v1.335.0
|
|
with:
|
|
ruby-version: '3.4'
|
|
bundler: none
|
|
|
|
- name: Run tool/sync_default_gems.rb
|
|
id: sync
|
|
run: |
|
|
ruby_before=$(git rev-parse HEAD)
|
|
set -x
|
|
ruby tool/sync_default_gems.rb "${gem_name}" "${gem_before}..${gem_after}"
|
|
if [[ "$(git rev-parse HEAD)" != "$ruby_before" ]]; then
|
|
echo update=true >> $GITHUB_OUTPUT
|
|
fi
|
|
env:
|
|
gem_name: ${{ github.event.inputs.gem }}
|
|
gem_before: ${{ github.event.inputs.before }}
|
|
gem_after: ${{ github.event.inputs.after }}
|
|
EMAIL: svn-admin@ruby-lang.org
|
|
GIT_AUTHOR_NAME: git
|
|
GIT_COMMITTER_NAME: git
|
|
|
|
- name: Push
|
|
run: |
|
|
git pull --rebase origin ${GITHUB_REF#refs/heads/}
|
|
git push origin ${GITHUB_REF#refs/heads/}
|
|
if: ${{ steps.sync.outputs.update && env.DEFAULT_GEM_SYNC_ENABLED == 'true' }}
|
|
env:
|
|
EMAIL: svn-admin@ruby-lang.org
|
|
GIT_AUTHOR_NAME: git
|
|
GIT_COMMITTER_NAME: git
|
|
|
|
- uses: ./.github/actions/slack
|
|
with:
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
|
|
label: "${{ github.event.inputs.gem }} (<https://github.com/${{ github.event.inputs.gem == 'rubygems' && 'rubygems' || 'ruby' }}/${{ github.event.inputs.gem }}/compare/${{ github.event.inputs.before }}...${{ github.event.inputs.after }}|diff>)"
|
|
event_name: workflow_dispatch
|
|
extra_channel_id: C05FPKAU743 # alerts-sync
|
|
if: ${{ failure() }}
|