-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.35 KB
/
tusk-sanity-checks.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
47
48
49
50
name: Tusk Sanity Check
on:
workflow_dispatch: # Use workflow_dispatch because Tusk will trigger this on its own
inputs:
taskId:
description: "Task ID"
required: true
runType:
description: "Run Type"
required: true
runId:
description: "Run ID"
required: true
jobs:
format_code:
runs-on: ubuntu-latest
steps:
- name: Log inputs
run: |
echo "Task ID: ${{ github.event.inputs.taskId }}"
echo "Run Type: ${{ github.event.inputs.runType }}"
echo "Run ID: ${{ github.event.inputs.runId }}"
echo "Current Branch: ${{ github.ref }}"
echo "Repository default branch: ${{ github.event.repository.default_branch }}"
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black
- name: Run Black for code formatting
run: black -l 120 ./src
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "fix(${{ github.run_id }}): auto code formatting"
skip_fetch: true
skip_checkout: true