-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (37 loc) · 1.16 KB
/
fetch-grammar.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
39
40
41
42
43
44
name: Update grammar
on:
repository_dispatch:
types:
- grammar-updated
jobs:
update-grammar:
runs-on: ubuntu-latest
steps:
- name: Checkout Main repository
uses: actions/checkout@v3
- name: Checkout smalig repository
uses: actions/checkout@v3
with:
repository: RevEngiSquad/smalig
path: smalig
- name: Update file
run: |
mv ./smalig/smalig/grammar.yaml ./public/grammar.yaml
rm -r smalig
- name: Commit changes
run: |
git add ./public/grammar.yaml
if git diff --cached --quiet; then
echo "No changes to commit."
exit 0
fi
echo "file_updated=true" >> $GITHUB_ENV
- name: Create Pull Request
if: success() && env.file_updated == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update smali-opcodes/grammar.yaml"
branch: update-grammar-file
title: "Update for grammar file"
body: "This PR updates the smali-opcodes/grammar.yaml file with the latest changes."