[CI] wheelhouse: add manual workflow_dispatch with force_all input
All checks were successful
wheelhouse / wheelhouse (push) Successful in 19s
All checks were successful
wheelhouse / wheelhouse (push) Successful in 19s
Allows triggering from the Actions tab; force_all=true builds & publishes every addon regardless of the changed-files diff, to seed the registry on the first run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c15f90b09e
commit
11e7fe721c
1 changed files with 40 additions and 20 deletions
|
|
@ -23,6 +23,15 @@ on:
|
|||
# All Odoo series branches: 16.0, 17.0, 18.0, ...
|
||||
# Deliberately excludes 16.0-ocabot-* / feature branches.
|
||||
- "*.0"
|
||||
# Manual trigger (Actions tab -> "Run workflow"). Use force_all=true to
|
||||
# build & publish every addon regardless of the changed-files diff -- handy
|
||||
# for seeding the registry on the very first run.
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
force_all:
|
||||
description: "Build & publish ALL addons (ignore the changed-files diff)"
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
wheelhouse:
|
||||
|
|
@ -40,10 +49,21 @@ jobs:
|
|||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Determine changed addons
|
||||
- name: Determine addons to build
|
||||
id: changed
|
||||
run: |
|
||||
set -euo pipefail
|
||||
force="${{ github.event.inputs.force_all || 'false' }}"
|
||||
addons=""
|
||||
if [ "$force" = "true" ]; then
|
||||
# Forced run: build every addon, ignore the diff.
|
||||
for addon in */ ; do
|
||||
name="${addon%/}"
|
||||
if [ -f "${addon}__manifest__.py" ] && [ -f "${addon}pyproject.toml" ]; then
|
||||
addons="${addons} ${name}"
|
||||
fi
|
||||
done
|
||||
else
|
||||
before="${{ github.event.before }}"
|
||||
# On the first push to a branch (or a force-push), `before` is all
|
||||
# zeros / unreachable; fall back to the parent commit.
|
||||
|
|
@ -56,7 +76,6 @@ jobs:
|
|||
changed_files="$(git ls-files)"
|
||||
fi
|
||||
# Reduce to top-level addon dirs that actually changed and are addons.
|
||||
addons=""
|
||||
for addon in */ ; do
|
||||
name="${addon%/}"
|
||||
if [ -f "${addon}__manifest__.py" ] && [ -f "${addon}pyproject.toml" ] \
|
||||
|
|
@ -64,8 +83,9 @@ jobs:
|
|||
addons="${addons} ${name}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
addons="$(echo "$addons" | xargs || true)"
|
||||
echo "Changed addons:${addons:- (none)}"
|
||||
echo "Addons to build:${addons:- (none)}"
|
||||
echo "addons=${addons}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build wheels for changed addons
|
||||
|
|
|
|||
Loading…
Reference in a new issue