Skip to content

Commit

Permalink
Update stats
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeweerd committed Dec 4, 2023
1 parent 48fbd76 commit 2f74321
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/stats.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
---
name: stats
on: [create]
on: [create, workflow_dispatch]
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
with:
ref: ${{ steps.extract_branch.outputs.branch }}
- run: ${{ github.workspace }}/.github/scripts/gen_stats.sh
- run: |
git status
git branch
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m '[Bot] stats - Update STATS.md'
git push
- name: Commit updated resources
if: false
uses: test-room-7/action-update-file@v1
with:
file-path: STATS.md
Expand Down

0 comments on commit 2f74321

Please sign in to comment.