diff --git a/.github/actions/dependencies/action.yml b/.github/actions/dependencies/action.yml index c9ed6162d..71ca20603 100644 --- a/.github/actions/dependencies/action.yml +++ b/.github/actions/dependencies/action.yml @@ -3,8 +3,8 @@ description: Install UV and dependencies runs: using: composite steps: - - name: Install uv - uses: astral-sh/setup-uv@v4 + - name: Set up uv + uses: astral-sh/setup-uv@v7 - name: Install dependencies shell: bash diff --git a/.github/actions/uv/action.yml b/.github/actions/uv/action.yml index 07d45b0d6..121fc243f 100644 --- a/.github/actions/uv/action.yml +++ b/.github/actions/uv/action.yml @@ -3,7 +3,7 @@ description: Install UV runs: using: composite steps: - - name: Set up UV - uses: astral-sh/setup-uv@v3 + - name: Set up uv + uses: astral-sh/setup-uv@v7 with: enable-cache: true \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 42baa2574..54c633a0d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -16,4 +16,18 @@ updates: groups: actions: patterns: - - "github-actions" + - "*" + + - package-ecosystem: "uv" + directory: "/" + schedule: + interval: "monthly" + commit-message: + prefix: "deps(dependabot):" + open-pull-requests-limit: 1 + rebase-strategy: "auto" + groups: + python-all: + patterns: + - "*" + diff --git a/.github/workflows/make-requirements.yml b/.github/workflows/make-requirements.yml index 7e60bed13..86b7816e6 100644 --- a/.github/workflows/make-requirements.yml +++ b/.github/workflows/make-requirements.yml @@ -90,17 +90,23 @@ jobs: - name: Get timestamp id: timestamp - run: echo "timestamp=$(date +'%Y-%m-%d_%H-%M')" >> $GITHUB_OUTPUT + run: echo "timestamp=$(date +'%Y-%m-%d_%H-%M')_${{ github.run_id }}" >> $GITHUB_OUTPUT - name: Create Pull Request - uses: peter-evans/create-pull-request@v8 - with: - base: main - title: admin/requirements-update_${{ steps.timestamp.outputs.timestamp }} - body: Updating requirements.txt. - - Due to some [challenges](https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs), - with getting this PR to trigger the tests, please manually close and re-open this PR. - branch: admin/requirements-update_${{ steps.timestamp.outputs.timestamp }} - commit-message: Updating requirements.txt after change to `uv.lock` was pushed to `main` - delete-branch: true \ No newline at end of file + env: + GH_TOKEN: ${{ secrets.WORKFLOW_PAT }} + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }} + BRANCH="admin/requirements-update_${{ steps.timestamp.outputs.timestamp }}" + git checkout -b "$BRANCH" + git add requirements/ + git diff --cached --quiet && echo "No changes to commit" && exit 0 + git commit -m "Updating requirements.txt after change to \`uv.lock\` was pushed to \`main\`" + git push origin "$BRANCH" + gh pr create \ + --base main \ + --head "$BRANCH" \ + --title "admin/requirements-update_${{ steps.timestamp.outputs.timestamp }}" \ + --body "Updating requirements.txt." \ No newline at end of file