-
Notifications
You must be signed in to change notification settings - Fork 34
31 lines (31 loc) · 1.16 KB
/
stats.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
---
name: stats
on: [create]
jobs:
gen_stats:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
steps:
# Credit: https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions
- name: Extract branch name
shell: bash
#run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/}) >> $GITHUB_OUTPUT"
id: extract_branch
- uses: actions/checkout@v4
#with:
# ref: ${{ steps.extract_branch.outputs.branch }}
# fetch-depth: 0
- run: ${{ github.workspace }}/.github/scripts/gen_stats.sh
- name: Commit updated resources
uses: test-room-7/action-update-file@v1
with:
file-path: STATS.md
commit-msg: '[Bot] stats - Update STATS.md'
github-token: ${{ secrets.GITHUB_TOKEN }}
# - uses: stefanzweifel/git-auto-commit-action@v4
# with:
# commit_message: '[Bot] stats - Update STATS.md'
# commit_user_name: stats
# commit_user_email: stats@nill
# commit_author: STATS BOT <stats>