Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the Add License workflow, match the python-version with the project, and switch to dependency-only mode for poetry #8

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .github/workflows/add-license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,24 @@ jobs:
- 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"
output=$(python scripts/add_license.py) || ""
echo "$output"
if echo "$output" | grep -q "added"; then
echo "added_license=true" >> $GITHUB_OUTPUT
else
echo "::set-output name=changes::false"
echo "added_license=false" >> $GITHUB_OUTPUT
fi
id: add_license

- name: Commit changes
if: steps.changes.outputs.changes == true
if: steps.add_license.outputs.added_license == true
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "[email protected]"
git add .
git add --all
git commit -m "Add license to files"
git push
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