File: update-ruby.yml

package info (click to toggle)
ruby-build 20260222-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,152 kB
  • sloc: sh: 1,929; ruby: 26; makefile: 19
file content (49 lines) | stat: -rw-r--r-- 1,704 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Update Ruby definitions

on:
  workflow_dispatch:
    inputs:
      ruby_version:
          description: 'Ruby version'
          required: true
          default: '3.3.4'
      openssl_version:
            description: 'OpenSSL version'
            required: true
            default: '3.0.15'

  repository_dispatch:
    types: [update-ruby]

jobs:
  update-ruby:
    name: Update Ruby definitions
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Store Ruby version
        run: echo "RUBY_VERSION=${{ github.event.client_payload.ruby_version || github.event.inputs.ruby_version }}" >> $GITHUB_ENV

      - name: Store ABI version
        run: echo "ABI_VERSION=$(echo ${{ env.RUBY_VERSION }} | cut -d '.' -f 1-2)" >> $GITHUB_ENV

      - name: Store OpenSSL version
        run: echo "OPENSSL_VERSION=${{ github.event.client_payload.openssl_version || github.event.inputs.openssl_version }}" >> $GITHUB_ENV

      - name: Run script/update-cruby
        run: |
          curl -fsL https://cache.ruby-lang.org/pub/ruby/${{ env.ABI_VERSION }}/ruby-${{ env.RUBY_VERSION }}.tar.gz -O
          curl -fsL https://www.openssl.org/source/openssl-${{ env.OPENSSL_VERSION }}.tar.gz -O
          script/update-cruby ${{ env.RUBY_VERSION }} ${{ env.OPENSSL_VERSION }} .
          rm *.gz

      - name: commit and push
        run: |
          git config user.name "GitHub Actions Bot"
          git config user.email "github-actions[bot]@users.noreply.github.com"
          git add .
          git commit -m "Added ${{ env.RUBY_VERSION }} with OpenSSL ${{ env.OPENSSL_VERSION }}"
          git push
        env:
          GITHUB_TOKEN: ${{ secrets.COMMITTER_TOKEN }}