From: Patrick Donnelly Date: Thu, 26 Jun 2025 02:04:24 +0000 (-0400) Subject: .github: add workflow for redmine upkeep X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=05419ae5f667094e3cc4e27add95ecf96298914b;p=ceph.git .github: add workflow for redmine upkeep Signed-off-by: Patrick Donnelly --- diff --git a/.github/workflows/redmine-upkeep.yml b/.github/workflows/redmine-upkeep.yml new file mode 100644 index 0000000000000..49d3cabc7dbdd --- /dev/null +++ b/.github/workflows/redmine-upkeep.yml @@ -0,0 +1,61 @@ +--- +name: Redmine Upkeep +on: + # To manually trigger this: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch + # View past runs and output: https://github.com/ceph/ceph/actions/workflows/create-backport-trackers.yml + workflow_dispatch: + inputs: + issue: + description: 'issue to update' + type: string + default: '' + limit: + description: '--limit: limit issue traversal' + default: 50 + type: int + debug: + description: '--debug: Show debug-level messages' + default: false + type: boolean + schedule: + - cron: '*/30 * * * *' +# TODO enable/setup after upkeep has caught up +# push: +# tags: +# - 'v*' + # for testing + push: + branches: + - 'feature/redmine-upkeep' +concurrency: + group: redmine-upkeep-workflow-concurrency-group + cancel-in-progress: false +jobs: + redmine-upkeep: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/feature/redmine-upkeep' + steps: + - name: checkout main + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + path: ceph + fetch-depth: 0 + + - name: Setup Python + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 + with: + python-version: '3.9' + cache: 'pip' + cache-dependency-path: ceph/src/script/requirements.redmine-upkeep.txt + + - name: install dependencies + run: pip install -r ceph/src/script/requirements.redmine-upkeep.txt + + - run: > + python3 ceph/src/script/redmine-upkeep.py + --github-action + --git-dir=./ceph/ + ${{ github.event_name == 'workflow_dispatch' && (inputs.debug && '--debug' || '') || '' }} + ${{ github.event_name == 'workflow_dispatch' && format('--limit={}', inputs.limit) || '' }} + env: + REDMINE_API_KEY: ${{ secrets.REDMINE_API_KEY_BACKPORT_BOT }} diff --git a/src/script/requirements.redmine-upkeep.txt b/src/script/requirements.redmine-upkeep.txt new file mode 100644 index 0000000000000..51d5fee838e0f --- /dev/null +++ b/src/script/requirements.redmine-upkeep.txt @@ -0,0 +1,2 @@ +python-redmine == 2.3.0 +GitPython == 3.1.44