This is an automated email from the ASF dual-hosted git repository. hainenber pushed a commit to branch feat/run-uv-compile-for-python-deps-pr in repository https://gitbox.apache.org/repos/asf/superset.git
commit 07e1faed5fa8a5d5f5d5fd96f03fe27064956a8f Author: hainenber <[email protected]> AuthorDate: Sat May 30 16:05:36 2026 +0700 feat(ci): add workflow to automatically sync pinned requirements for `pip` Dependabot PRs Signed-off-by: hainenber <[email protected]> --- ...sync-requirements-for-python-dep-upgrade-pr.yml | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/.github/workflows/sync-requirements-for-python-dep-upgrade-pr.yml b/.github/workflows/sync-requirements-for-python-dep-upgrade-pr.yml new file mode 100644 index 00000000000..97e9a283592 --- /dev/null +++ b/.github/workflows/sync-requirements-for-python-dep-upgrade-pr.yml @@ -0,0 +1,50 @@ +name: Sync requirements for Python dependency PRs + +on: + pull_request: + types: [opened, synchronize] + +permissions: + contents: write + pull-requests: read + +jobs: + sync-python-dep-requirements: + if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} + runs-on: ubuntu-slim + steps: + - name: Fetch Dependabot metadata + id: dependabot-metadata + uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0 + + - name: Checkout source code + if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'pip' }} + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + ref: ${{ github.event.pull_request.head.sha }} + persist-credentials: false + + - name: Setup Python + if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'pip' }} + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version-file: 'pyproject.toml' + + - name: Install uv + run: pip install uv==0.11.17 + + - name: Sync requirements + if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'pip' }} + run: ./scripts/uv-pip-compile.sh + + - name: Push changes to remote PRs + if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'pip' }} + run: | + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + git add requirements + git diff --cached --quiet && exit 0 + git commit --signoff "build(deps) sync pinned requirements for Dependabot pip PRs" + git push origin "HEAD:refs/heads/${GITHUB_EVENT_PULL_REQUEST_HEAD_REF}" + env: + GITHUB_EVENT_PULL_REQUEST_HEAD_REF: ${{github.event.pull_request.head.ref}}
