We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a2cefb commit 3cc5a33Copy full SHA for 3cc5a33
1 file changed
.github/workflows/update-requirements.yml
@@ -9,6 +9,12 @@ on:
9
jobs:
10
update-requirements:
11
runs-on: ubuntu-latest
12
+
13
+ # --- THIS IS THE FIX ---
14
+ # Grant the job the necessary permissions to push code.
15
+ permissions:
16
+ contents: write
17
18
steps:
19
- uses: actions/checkout@v4
20
@@ -23,10 +29,11 @@ jobs:
23
29
- name: Compile requirements
24
30
run: pip-compile pyproject.toml -o requirements.txt --resolver=backtracking
25
31
26
- - name: Commit changes
32
+ - name: Commit and push changes
27
33
run: |
28
34
git config --local user.email "action@github.com"
35
git config --local user.name "GitHub Action"
36
git add requirements.txt
37
+ # This command only commits if there's an actual change
38
git diff --staged --quiet || git commit -m "chore: Update requirements.txt"
39
git push
0 commit comments