-
-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (37 loc) · 1.09 KB
/
RepoCommitCounter.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
41
42
43
44
45
name: NoAds Commit Counter
on:
push:
paths:
- 'fritz/fritz_blacklist.txt'
- 'experimental.txt'
workflow_dispatch:
jobs:
count-commits:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set Timezone
uses: szenius/[email protected]
with:
timezoneLinux: "Europe/Rome"
- name: Set date and time
run: sh ./sh/datetime.sh
- name: Count Commits
run: |
COMMIT_COUNT=$(git rev-list --count HEAD)
echo "Commit count: $COMMIT_COUNT"
echo $COMMIT_COUNT > vcheck/check_gh.txt
- name: Commit updated counter
run: |
git config --local user.email "[email protected]"
git config --local user.name "GWall[bot]"
git add vcheck/check_gh.txt
git commit -m "Commit Counter del $lastmodified" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}