-
Notifications
You must be signed in to change notification settings - Fork 603
38 lines (36 loc) · 1.09 KB
/
re-sort.yml
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
name: Re-sort Blogs
on:
workflow_dispatch:
schedule:
- cron: "0 7 * * 2,3,5" # At 7:00am on Tuesday, Wednesday, and Friday
jobs:
sort:
name: Re-sort Blogs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Re-sort Blogs
uses: mathiasvr/command-output@v2.0.0
with:
run: bundle exec rake sort:blogs
- name: Check for Changes
run: bash .github/check_for_changes.sh
id: check
- name: Replace blogs.json
if: steps.check.outputs.changes == 'true'
run: mv new_blogs.json blogs.json
- name: Create Pull Request
if: steps.check.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v5
with:
add-paths: |
blogs.json
commit-message: "Re-sorted blogs."
title: "Re-sorted blogs"
branch: auto-${{ github.run_id }}
delete-branch: true
committer: GitHub <noreply@github.com>
author: GitHub <noreply@github.com>