From 9958b44ef1792a2e0f6881dc3d95ae28e31a44c3 Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Tue, 24 Sep 2024 14:26:02 +0200 Subject: [PATCH] ci: Allow building/releasing a specific plugin --- .github/workflows/build.yml | 26 +++++++++++++++++++++++++- .github/workflows/pypi.yml | 31 ++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ea47dbf..45da810e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,28 @@ on: type: boolean default: true description: Append version suffix + plugin-name: + description: Build specific plugin + type: choice + options: + - '' # all plugins + - citadel + - cloud_captchas + - livesync + - livesync_debug + - owncloud + - payment_manual + - payment_paypal + - payment_sixpay + - piwik + - previewer_code + - previewer_jupyter + - prometheus + - storage_s3 + - themes_legacy + - ursh + - vc_dummy + - vc_zoom permissions: contents: read @@ -31,10 +53,12 @@ permissions: jobs: build: name: Build plugins 🏗 - uses: indico/indico-gh-actions/.github/workflows/build-plugins.yml@master + uses: ThiefMaster/indico-gh-actions/.github/workflows/build-plugins.yml@master with: + scripts-repo: ThiefMaster/indico-gh-actions directory: public add-version-suffix: ${{ github.event_name != 'workflow_dispatch' || inputs.add-version-suffix }} + plugin: ${{ github.event_name == 'workflow_dispatch' && inputs.plugin-name }} bundle: name: Bundle wheels 📦 diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index e2f8d656..c3a79a62 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -18,6 +18,31 @@ on: - '!v3.2' - '!v3.2.*' - '!*\+docs' + workflow_dispatch: + inputs: + plugin-name: + description: Plugin name + required: true + type: choice + options: + - '' # this is invalid for a `required` dropdown so we force a choice instead of preselecting the first one + - citadel + - cloud_captchas + - livesync + - livesync_debug + - owncloud + - payment_manual + - payment_paypal + - payment_sixpay + - piwik + - previewer_code + - previewer_jupyter + - prometheus + - storage_s3 + - themes_legacy + - ursh + - vc_dummy + - vc_zoom permissions: contents: read @@ -26,6 +51,7 @@ jobs: check-version: name: Check version runs-on: ubuntu-22.04 + if: github.event_name != 'workflow_dispatch' steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -38,10 +64,13 @@ jobs: build: name: Build plugins 🏗 needs: check-version - uses: indico/indico-gh-actions/.github/workflows/build-plugins.yml@master + if: !cancelled() && (needs.check-version.result == 'success' || needs.check-version.result == 'skipped') + uses: ThiefMaster/indico-gh-actions/.github/workflows/build-plugins.yml@master with: + scripts-repo: ThiefMaster/indico-gh-actions directory: public add-version-suffix: false + plugin: ${{ github.event_name == 'workflow_dispatch' && inputs.plugin-name }} test-install: name: Test installing plugins