Debian Codegraph @

.github/workflows/update-ruby.yml

raw
1 name: Update Ruby definitions
2
3 on:
4 workflow_dispatch:
5 inputs:
6 ruby_version:
7 description: 'Ruby version'
8 required: true
9 default: '3.3.4'
10 openssl_version:
11 description: 'OpenSSL version'
12 required: true
13 default: '3.0.15'
14
15 repository_dispatch:
16 types: [update-ruby]
17
18 jobs:
19 update-ruby:
20 name: Update Ruby definitions
21 runs-on: ubuntu-latest
22 steps:
23 - uses: actions/checkout@v7
24
25 - name: Store Ruby version
26 run: echo "RUBY_VERSION=${{ github.event.client_payload.ruby_version || github.event.inputs.ruby_version }}" >> $GITHUB_ENV
27
28 - name: Store ABI version
29 run: echo "ABI_VERSION=$(echo ${{ env.RUBY_VERSION }} | cut -d '.' -f 1-2)" >> $GITHUB_ENV
30
31 - name: Store OpenSSL version
32 run: echo "OPENSSL_VERSION=${{ github.event.client_payload.openssl_version || github.event.inputs.openssl_version }}" >> $GITHUB_ENV
33
34 - name: Run script/update-cruby
35 run: |
36 curl -fsL https://cache.ruby-lang.org/pub/ruby/${{ env.ABI_VERSION }}/ruby-${{ env.RUBY_VERSION }}.tar.gz -O
37 curl -fsL https://www.openssl.org/source/openssl-${{ env.OPENSSL_VERSION }}.tar.gz -O
38 script/update-cruby ${{ env.RUBY_VERSION }} ${{ env.OPENSSL_VERSION }} .
39 rm *.gz
40
41 - name: commit and push
42 run: |
43 git config user.name "GitHub Actions Bot"
44 git config user.email "github-actions[bot]@users.noreply.github.com"
45 git add .
46 git commit -m "Added ${{ env.RUBY_VERSION }} with OpenSSL ${{ env.OPENSSL_VERSION }}"
47 git push
48 env:
49 GITHUB_TOKEN: ${{ secrets.COMMITTER_TOKEN }}