forked from TFcis/NTOJ
-
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.
Showing
1 changed file
with
44 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,44 @@ | ||
name: Update requirement.txt | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'poetry.lock' | ||
|
||
jobs: | ||
update-requirements: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' # Specify your desired Python version | ||
|
||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
export PATH="$HOME/.local/bin:$PATH" | ||
- name: Install dependencies | ||
run: | | ||
export PATH="$HOME/.local/bin:$PATH" | ||
poetry install | ||
- name: Export requirements.txt | ||
run: | | ||
export PATH="$HOME/.local/bin:$PATH" | ||
poetry export --without-hashes --format=requirements.txt > scripts/requirements.txt | ||
- name: Commit changes | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add scripts/requirements.txt | ||
git commit -m 'Chore: Update requirements.txt' | ||
git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |