-
Notifications
You must be signed in to change notification settings - Fork 114
46 lines (37 loc) · 1.17 KB
/
format_check.yaml
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
45
46
name: Post-push Format Checker
on:
push:
branches:
- dev
- main
jobs:
format-check:
name: Format Check
runs-on: ubuntu-latest
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
container:
image: columbiasld/esp:ubuntu18-small
credentials:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Set directory ownership
run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE
- name: Configure Git
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Install formatting tools
run: |
run: |
./install.sh
working-directory: ./utils/scripts/format/tools
- name: Navigate to formatting scripts directory and run format check
run: |
if ! ./format.sh -g -ca; then
echo "Code format check failed. Please fix the formatting issues by running the formatting script."
exit 1
fi
working-directory: ./utils/scripts/format