Skip to content

Commit

Permalink
feat(CI): add and maintain ruby-version
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Jun 29, 2023
1 parent bfe31b1 commit 64b7f8f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ruby-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Regular .ruby-version update check
on:
schedule:
- cron: "5 0 * * *"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Extract the version of ruby
run: |
base="registry.access.redhat.com/ubi8/ubi-minimal"
docker run --rm -u 0 "${base}":latest sh -c "
microdnf module enable ruby:3.1 > /dev/null;
microdnf repoquery ruby --info | grep Version | awk '{ print \$3 }' | head -1 > .ruby-version;
cat .ruby-version" > .ruby-version
- name: Do change if the digest changed
run: |
git config user.name 'Update-a-Bot'
git config user.email '[email protected]'
git add .ruby-version
git commit -m "chore(devel): update .ruby-version" || echo "No new changes"
- name: Create pull request
uses: peter-evans/create-pull-request@v4
with:
title: 'chore(devel): update .ruby-version'
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.1.2

0 comments on commit 64b7f8f

Please sign in to comment.