Check and update renamed/removed collection items #22746
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: Check and update renamed/removed collection items | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 * * * *" # every hour | |
permissions: | |
contents: read | |
jobs: | |
update: | |
permissions: | |
pull-requests: write | |
contents: write | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'github' | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@2654679fe7f7c29875c669398a8ec0791b8a64a1 # v1.215.0 | |
with: | |
bundler-cache: true | |
- name: Test collections and commit the changes | |
env: | |
AUTOCORRECT_RENAMED_REPOS: 1 | |
run: bundle exec rake collections | |
- name: Test collection with autofix and commit changes | |
uses: peter-evans/create-pull-request@v7 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
commit-message: "✨ Autofixing renamed/removed collection items ✨" | |
commiter: "github-actions[bot] <[email protected]>" | |
branch: "update-collections-${PR_ID}" | |
title: "✨ Autofixing renamed/removed collection items ✨" |