Skip to content

uchendui is updating TinyML book contributors #7

uchendui is updating TinyML book contributors

uchendui is updating TinyML book contributors #7

name: Automatically Add Contributors
run-name: ${{ github.actor }} is updating TinyML book contributors
on:
push:
branches:
auto_contributor
jobs:
update-contributors:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install python packages
run: |
python -m pip install --upgrade pip
pip install -r .github/actions/update_contributors/requirements.txt
- name: Retrieving contributors for commit ${{ github.sha }}
run: |
echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
echo "🔎 Getting all contributors from the ${{ github.ref }} branch."
PUSHED_CONTRIBUTORS=$(git shortlog -sne --no-merges ${{ github.event.before }}..${{ github.sha }})
echo "The contributors are: $PUSHED_CONTRIBUTORS"
- name: Preprocessing Contributors
run: |
echo "hi"
- name: Saving contributors to CONTRIBUTORS_TEMP.txt
run: |
echo "Saving contributors to CONTRIBUTORS_TEMP.txt"
echo "$PUSHED_CONTRIBUTORS" > CONTRIBUTORS_TEMP.txt
- name: Adding contributors to CONTRIBUTORS.md
run: |
echo "Adding contributors to CONTRIBUTORS.md"
python3.11 .github/actions/update_contributors/update_contributors.py