Update count_commits.yml #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Change to 'Programming/Python3/' directory | |
run: cd 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() |