Update Requirements #4
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
name: Update Requirements | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'packages/**/pyproject.toml' | |
- 'packages/**/poetry.lock' | |
branches: | |
- main | |
jobs: | |
update_requirements: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 "githubactions@github.com" | |
git add requirements.txt | |
git diff --staged --quiet && exit 0 || true | |
git commit -m "chore(led_effect): Update requirements.txt from poetry.lock" | |
git push origin HEAD:${GITHUB_REF} |