Skip to content

Commit

Permalink
Merge pull request #10 from YeetCode-devs/staging/prathamdby
Browse files Browse the repository at this point in the history
Revamp the Add License workflow and switch to dependency-only mode for poetry
  • Loading branch information
prathamdby authored Mar 18, 2024
2 parents 595803c + 691c7ac commit e4cf061
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/add-license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Add License
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

Expand All @@ -15,30 +13,18 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to retrieve full commit history
persist-credentials: false # Required to allow the use of the token to push back to the repository

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.10"

- name: Add License
run: |
python scripts/add_license.py
- name: Check for file changes
id: changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "::set-output name=changes::true"
else
echo "::set-output name=changes::false"
fi
- name: Commit changes
if: steps.changes.outputs.changes == true
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "[email protected]"
git add .
git commit -m "Add license to files"
git push
- uses: GuillaumeFalourd/[email protected]
with:
commit_message: "Add license to files"
target_branch: main
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description = "A Telegram chat bot with support for multiple LLMs!"
authors = ["YeetCode Developers <[email protected]>"]
license = "GPL-3.0-only"
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "^3.10"
Expand Down

0 comments on commit e4cf061

Please sign in to comment.