Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix action to generate js and py
Browse files Browse the repository at this point in the history
since master branch is protected, to update js and py create
pull-request and do auto-merging in action.
ichizok committed Apr 10, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 4b9fda4 commit a67a680
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -74,16 +74,20 @@ jobs:
vim --version
make --keep-going $MAKE_TARGET
- name: Commit and push
if: success() && matrix.make_target == 'fast-test' && github.ref_name == 'master'
- name: Generate js and py
if: matrix.make_target == 'fast-test' && github.ref_name == 'master'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if ! make fast-check; then
git config --local user.name 'github-actions[bot]'
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin 'https://github-actions:${{ github.token }}@github.com/${{ github.repository }}'
git switch -c bot/generate-jspy
git add js/vimlparser.js py/vimlparser.py
git commit -m 'generate js and py'
git push origin '${{ github.ref_name }}'
git commit -m 'chore: generate js and py'
git push -u origin "$(git rev-parse --abbrev-ref @)"
gh pr create --base master --title 'chore: generate js and py' --body '' | tee /tmp/pull_request
gh pr merge "$(cat /tmp/pull_request)" --auto --merge --delete-branch
fi
- name: Coverage from Python

0 comments on commit a67a680

Please sign in to comment.