-
Notifications
You must be signed in to change notification settings - Fork 14.1k
47 lines (40 loc) · 1.38 KB
/
collections-renames.yml
File metadata and controls
47 lines (40 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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/checkout@v6.0.1
- name: Setup Ruby
uses: ruby/setup-ruby@80740b3b13bf9857e28854481ca95a84e78a2bdf # v1.284.0
with:
bundler-cache: true
- name: Test collections and modify with changes
env:
AUTOCORRECT_RENAMED_REPOS: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bundle exec rake collections
- name: Commit changes and open PR
id: cpr
uses: peter-evans/create-pull-request@v8
with:
commit-message: "✨ Autofixing renamed/removed collection items ✨"
committer: "github-actions[bot] <actions@github.com>"
branch: "update-collections-${PR_ID}"
title: "✨ Autofixing renamed/removed collection items ✨"
- name: Auto-merge PR
if: steps.cpr.outputs.pull-request-number
run: |
gh pr review --approve "${{ steps.cpr.outputs.pull-request-url }}"
gh pr merge --auto "${{ steps.cpr.outputs.pull-request-url }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}