-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 872 Bytes
/
on-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
33
34
35
36
37
38
39
40
name: On Push
on:
push:
branches-ignore:
- main
permissions:
contents: write
actions: write
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout/@v4
with:
token: ${{ secrets.PAT_TOKEN }}
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Format
run: deno fmt
- name: Commit format changes if any
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m 'cicd(no-push): apply deno fmt changes'
git push
else
echo "No changes to commit"
fi