|
| 1 | +name: pip-compile-upgrade |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 20 14,28 * *' |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +jobs: |
| 9 | + pip-compile-upgrade: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - name: Checkout repo |
| 13 | + uses: actions/checkout@v6 |
| 14 | + with: |
| 15 | + ref: '17' |
| 16 | + |
| 17 | + - name: Upgrade java-api requirements |
| 18 | + uses: coatl-dev/actions/pip-compile-upgrade@v5 |
| 19 | + with: |
| 20 | + path: requirements.txt |
| 21 | + working-directory: java-api |
| 22 | + |
| 23 | + - name: Upgrade java-api-stubs requirements |
| 24 | + uses: coatl-dev/actions/uv-pip-compile-upgrade@v5 |
| 25 | + with: |
| 26 | + path: requirements.txt |
| 27 | + python-version: '3.12' |
| 28 | + working-directory: java-api-stubs |
| 29 | + |
| 30 | + - name: Detect changes |
| 31 | + id: git-diff |
| 32 | + uses: coatl-dev/actions/simple-git-diff@v5 |
| 33 | + with: |
| 34 | + path: ${{ github.workspace }} |
| 35 | + |
| 36 | + - name: Import GPG key |
| 37 | + if: ${{ steps.git-diff.outputs.diff == 'true' }} |
| 38 | + uses: coatl-dev/actions/gpg-import@v5 |
| 39 | + with: |
| 40 | + passphrase: ${{ secrets.COATL_BOT_GPG_PASSPHRASE }} |
| 41 | + private-key: ${{ secrets.COATL_BOT_GPG_PRIVATE_KEY }} |
| 42 | + |
| 43 | + - name: Build commit message |
| 44 | + if: ${{ steps.git-diff.outputs.diff == 'true' }} |
| 45 | + run: | |
| 46 | + echo "chore(requirements): pip-compile upgrade" > "$RUNNER_TEMP/commit.txt" |
| 47 | + { |
| 48 | + echo "" |
| 49 | + echo "updates:" |
| 50 | + git status --porcelain | awk 'match($1, "M") {print " - " $2}' |
| 51 | + } >> "$RUNNER_TEMP/commit.txt" |
| 52 | +
|
| 53 | + - name: Commit and push changes |
| 54 | + if: ${{ steps.git-diff.outputs.diff == 'true' }} |
| 55 | + run: | |
| 56 | + git checkout -B coatl-dev-pip-compile-upgrade |
| 57 | + git add --update |
| 58 | + git commit --file="${RUNNER_TEMP}/commit.txt" |
| 59 | + git push --force --set-upstream origin coatl-dev-pip-compile-upgrade |
| 60 | +
|
| 61 | + - name: Create pull request |
| 62 | + if: ${{ steps.git-diff.outputs.diff == 'true' }} |
| 63 | + uses: coatl-dev/actions/pr-create@v5 |
| 64 | + with: |
| 65 | + gh-token: ${{ secrets.COATL_BOT_GH_TOKEN }} |
| 66 | + additional-args: | |
| 67 | + --base 17 |
0 commit comments