Skip to content

check

check #9

name: Check for new CRuby releases on Windows
on:
schedule:
- cron: '0 7,19 * * *'
workflow_dispatch:
push: # TODO
permissions:
pull-requests: write
jobs:
check_windows_versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: ruby generate-windows-versions.rb
- name: TODO for testing
run: echo >> windows-versions.json
- id: diff
run: git diff --exit-code
continue-on-error: true
- if: ${{ steps.diff.outcome == 'failure' }} # changed
run: ./pre-commit
shell: bash
# See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#pushing-to-a-fork-with-fine-grained-permissions
- if: ${{ steps.diff.outcome == 'failure' }} # changed
uses: peter-evans/create-pull-request@v8
id: pr
with:
push-to-fork: ruby-builder-bot/setup-ruby
author: ruby-builder-bot <98265520+ruby-builder-bot@users.noreply.github.com>
committer: ruby-builder-bot <98265520+ruby-builder-bot@users.noreply.github.com>
title: Update CRuby releases on Windows
commit-message: Update CRuby releases on Windows
body: Automated PR (testing testing)
base: master
branch: windows
delete-branch: true
branch-token: ${{ secrets.PUSH_TO_RUBY_BUILDER_FORK_TOKEN }}
maintainer-can-modify: false
- if: ${{ steps.diff.outcome == 'failure' }} # changed
name: PR URL
run: echo "${{ steps.pr.outputs.pull-request-url }}"
shell: bash