Skip to content

Update count_commits.yml #10

Update count_commits.yml

Update count_commits.yml #10

Workflow file for this run

name: Count Commits
on:
push:
branches:
- main
jobs:
count_commits:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
ref: main # Specify the branch explicitly if needed
- name: Set up Node.js 16
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Change to '/Tutorials/Programming/Python3/' directory
run: cd "/Tutorials/Programming/Python3/"
- name: Count Commits
run: python count_commits.py
- name: Update Badge
run: |
count=$(cat commit_count.txt)
sed -i "s/COUNT/$count/" README.md
if: success()