-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (32 loc) · 1.06 KB
/
format_dev_push.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
name: Format Development Code (on Push)
on:
push:
branches: dev
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: dev
- name: Replace Client IP with Server IP
run: sed -i "s|request.environ.get('HTTP_X_FORWARDED_FOR', request.remote_addr)|requests.get('https://ipinfo.io/ip').text|g" app.py
- name: Enable Debugger Option
run: sed -i 's|app.run(host="0.0.0.0")|app.run(host="0.0.0.0", debug=True)|g' app.py
- name: Commit files
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Formatting code for development and testing." && git push || true
trigger:
needs: format
runs-on: ubuntu-latest
steps:
- name: Trigger CodeQL Analysis
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GH_PAT }}
repository: ${{ github.repository }}
event-type: codeql-dev