forked from julianschill/klipper-led_effect
-
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.
chore(actions): Add action to automatically update requirements.txt f…
…rom poetry.lock
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Update Requirements | ||
on: | ||
push: | ||
paths: | ||
- 'packages/**/pyproject.toml' | ||
- 'packages/**/poetry.lock' | ||
branches: | ||
- main | ||
|
||
env: | ||
PYTHON_VERSION: 3.x | ||
NODE_VERSION: latest | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
pages: write | ||
|
||
jobs: | ||
update_requirements: | ||
name: Build pages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- name: Install dependencies | ||
working-directory: ./packages/led_effect | ||
run: poetry export -o requirements.txt | ||
# Commit changes | ||
- name: Commit changes | ||
working-directory: ./packages/led_effect | ||
run: | | ||
set -euxo pipefail | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
git add requirements.txt | ||
git commit -m "chore(led_effect): Update requirements.txt from poetry.lock" | ||
git push origin HEAD:${GITHUB_REF} |