This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new cd136ad847 feat: GHA to bump python packages using supersetbot (#27863)
cd136ad847 is described below
commit cd136ad84758fe4cc1c34fd69c8d2742512ef6e3
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Thu Apr 11 10:03:27 2024 -0700
feat: GHA to bump python packages using supersetbot (#27863)
---
.github/actions/setup-supersetbot/action.yml | 4 ++
.github/workflows/bump-python-package.yml | 68 ++++++++++++++++++++++++++++
2 files changed, 72 insertions(+)
diff --git a/.github/actions/setup-supersetbot/action.yml
b/.github/actions/setup-supersetbot/action.yml
index e2a7034b85..c557b9b7e8 100644
--- a/.github/actions/setup-supersetbot/action.yml
+++ b/.github/actions/setup-supersetbot/action.yml
@@ -34,3 +34,7 @@ runs:
# simple trick to install globally with dependencies
npm pack
npm install -g ./supersetbot*.tgz
+
+ - name: echo supersetbot version
+ shell: bash
+ run: supersetbot version
diff --git a/.github/workflows/bump-python-package.yml
b/.github/workflows/bump-python-package.yml
new file mode 100644
index 0000000000..336e5235e4
--- /dev/null
+++ b/.github/workflows/bump-python-package.yml
@@ -0,0 +1,68 @@
+name: Bump Python Package
+
+on:
+ # Can be triggered manually
+ workflow_dispatch:
+ inputs:
+ package:
+ required: false
+ description: The python package to bump (all if empty)
+ group:
+ required: false
+ description: The optional dependency group to bump (as defined in
pyproject.toml)
+ limit:
+ required: true
+ description: Max number of PRs to open (0 for no limit)
+ default: 5
+
+jobs:
+ bump-python-package:
+ runs-on: ubuntu-latest
+ permissions:
+ actions: write
+ contents: write
+ pull-requests: write
+ checks: write
+ steps:
+
+ - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: true
+ ref: master
+
+ - name: Setup supersetbot
+ uses: ./.github/actions/setup-supersetbot/
+
+ - name: Set up Python ${{ inputs.python-version }}
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install pip-compile-multi
+ run: pip install pip-compile-multi
+
+ - name: supersetbot bump-python -p "${{ github.event.inputs.package }}"
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ git config --global user.email "[email protected]"
+ git config --global user.name "GitHub Action"
+
+ PACKAGE_OPT=""
+ if [ -n "${{ github.event.inputs.package }}" ]; then
+ PACKAGE_OPT="-p ${{ github.event.inputs.package }}"
+ fi
+
+ GROUP_OPT=""
+ if [ -n "${{ github.event.inputs.group }}" ]; then
+ GROUP_OPT="-g ${{ github.event.inputs.group }}"
+ fi
+
+ supersetbot bump-python \
+ --verbose \
+ --use-current-repo \
+ --include-subpackages \
+ --limit ${{ github.event.inputs.limit }} \
+ $PACKAGE_OPT \
+ $GROUP_OPT