diff --git a/.github/workflows/update_requirements.yaml b/.github/workflows/update_requirements.yaml new file mode 100644 index 0000000..db1dcce --- /dev/null +++ b/.github/workflows/update_requirements.yaml @@ -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 "githubactions@github.com" + git add requirements.txt + git commit -m "chore(led_effect): Update requirements.txt from poetry.lock" + git push origin HEAD:${GITHUB_REF}