From 64b7f8fe409ea796162fa9ef8b6c9c1bf6dccecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Hal=C3=A1sz?= Date: Thu, 29 Jun 2023 07:25:31 +0200 Subject: [PATCH] feat(CI): add and maintain ruby-version --- .github/workflows/ruby-update.yml | 28 ++++++++++++++++++++++++++++ .ruby-version | 1 + 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/ruby-update.yml create mode 100644 .ruby-version diff --git a/.github/workflows/ruby-update.yml b/.github/workflows/ruby-update.yml new file mode 100644 index 0000000..900c2d1 --- /dev/null +++ b/.github/workflows/ruby-update.yml @@ -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 'insights@redhat.com' + 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' diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..ef538c2 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.1.2