-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from YeetCode-devs/staging/prathamdby
Revamp the Add License workflow and switch to dependency-only mode for poetry
- Loading branch information
Showing
2 changed files
with
7 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,6 @@ name: Add License | |
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
|
||
|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|