-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(CI): add and maintain ruby-version
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.1.2 |