github: update openring workflow to use pull requests

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-08-15 21:54:31 +05:30
parent 25ad722b8a
commit 5425348c63
1 changed files with 13 additions and 1 deletions

View File

@ -26,8 +26,20 @@ jobs:
git config user.name "GitHub Actions"
git config user.email noreply@github.com
- name: Compare changes
run: if [[ $(git diff --stat) != '' ]]; then echo "::set-env name=UPDATED::true"; fi
- name: Commit and push changes
run: |
git add layouts/partials/openring.html
git commit --message "layouts: update openring"
git push origin src
- name: Create update PR
uses: thomaseizinger/create-pull-request@1.0.0
if: env.UPDATED == 'true'
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
head: bot/update-openring
base: src
title: 'openring sync'
body: 'Re-run openring update script'