Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command for syncing #12

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/bot-cmd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Grue-bot
on:
issue_comment:
types: [created]
name: Automatic Rebase
jobs:
sync-eips:
name: Sync with EIPs
if: contains(github.event.comment.body, '/sync')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Scrape EIPs
run: |
chmod +x "${GITHUB_WORKSPACE}/scrape-eips.sh"
"${GITHUB_WORKSPACE}/scrape-eips.sh"
- name: Check for changes
run: |
if git diff --exit-code -- .cache/eip-index; then
echo "changes_exist=false" >> $GITHUB_ENV
else
echo "changes_exist=true" >> $GITHUB_ENV
fi
- name: Commit files
if: ${{ env.changes_exist == 'true' }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "grue-bot"
git add .
git commit -am "[grue-bot] Generate .cache/eip-index"
- name: Push changes
if: ${{ env.changes_exist == 'true' }}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.FZF_TOKEN}}
branch: ${{ github.ref }}