1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

ci remove formatting request workflow

This approach is too risky and insecure in its current implementation.
This commit is contained in:
embeddedt 2021-12-13 08:55:36 -05:00 committed by GitHub
parent dddafaec94
commit 6de89e4b7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,48 +0,0 @@
name: Reformat PR code
on:
issue_comment:
types: [created]
jobs:
update-formatting:
continue-on-error: true
if: github.event.issue.user.login == 'embeddedt'
runs-on: ubuntu-latest
steps:
- uses: khan/pull-request-comment-trigger@bb03972cc9f423111f3b5a23fcc9fd32741acabb
if: success()
id: check-comment
with:
trigger: '@lvgl-bot format'
prefix_only: true
reaction: rocket
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- run: exit 1
if: steps.check-comment.outputs.triggered == 'false'
- name: Install astyle
if: success()
run: |
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
sudo apt-get update -y -qq
sudo apt-get install astyle
- uses: actions/checkout@v2
if: success()
with:
token: ${{ secrets.LVGL_BOT_TOKEN }}
- name: Checkout PR
uses: dawidd6/action-checkout-pr@v1
if: success()
with:
pr: ${{github.event.issue.number}}
token: ${{ secrets.LVGL_BOT_TOKEN }}
- name: Format code
run: python code-format.py
working-directory: scripts
- name: Commit changes
run: |
git config --global user.name 'lvgl-bot'
git config --global user.email 'lvgl-bot@users.noreply.github.com'
git config push.default upstream
git commit -am "style automatic formatting"
git push