Update Ruby versions #815
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
name: Update Ruby versions | |
on: | |
schedule: | |
- cron: "30 5 * * *" | |
workflow_dispatch: {} | |
permissions: | |
pull-requests: write | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: master | |
- name: Install Nix | |
uses: cachix/install-nix-action@v30 | |
- run: nix run .#update | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Create Pull Request | |
id: create-pull-request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.UPDATE_GITHUB_TOKEN }} | |
commit-message: Update Ruby versions | |
title: Update Ruby versions | |
body: | | |
Automatically created pull-request to update Ruby and Rubygems versions. | |
This is the result of running: | |
``` | |
nix run .#update | |
``` | |
See the workflow here: https://github.com/bobvanderlinden/nixpkgs-ruby/blob/master/.github/workflows/update.yml | |
delete-branch: true | |
branch: update-ruby-versions | |
- if: ${{ steps.create-pull-request.outputs.pull-request-operation == 'created' }} | |
uses: peter-evans/enable-pull-request-automerge@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
pull-request-number: ${{ steps.create-pull-request.outputs.pull-request-number }} | |