This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
SRP article improved #47
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
# This name will appear in the Actions | |
name: Generate Summaries | |
on: | |
# Allows to manually run the job(s) at any time | |
workflow_dispatch: | |
# Run on every push on the master branch | |
push: | |
branches: | |
- main | |
# Jobs list | |
jobs: | |
# Job name | |
generate-summaries: | |
# Where the workflow will run | |
runs-on: ubuntu-latest | |
# Steps list | |
steps: | |
# Checkout the repository content | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Setup python | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
# Generate/Update summaries | |
- name: Generate summaries | |
run: python Script.py | |
# Commit all changes | |
- name: Commit changes | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
git add . | |
git commit -m "[bot] Updated summaries" || exit 0 | |
git push origin main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |