Skip to content
Merged
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ updates:
- "/check-vulnerabilities"
- "/hk-package-clean-except"
- "/hk-package-clean-untagged"
- "/check-licenses"
schedule:
interval: "daily"
cooldown:
Expand Down
33 changes: 12 additions & 21 deletions check-licenses/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,17 @@ runs:
with:
level: "ERROR"
message: >
The check-licenses action leverages Ansys fork of pip-licenses.
The check-licenses action depends on the prettytable package.
This package requires Python 3.10 or higher.

- name: Announce the switch to original pip-licenses package
uses: ansys/actions/_logging@main
with:
level: "INFO"
message: >
Maintenance of the original pip-licenses package has resumed, and the Ansys fork is being discontinued.
Therefore, the check-licenses action has been updated to use the original pip-licenses package.

- name: "Install Git and clone project"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
Expand Down Expand Up @@ -266,31 +274,14 @@ runs:
fi
fi

- name: "Update pip"
- name: "Update pip and install pip-licenses library"
shell: bash
env:
ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
run: |
${ACTIVATE_VENV}
$INSTALL_COMMAND -U pip

- name: Clone ansys/pip-licenses on main branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ansys/pip-licenses
path: "external/pip-licenses"
ref: "main"
persist-credentials: false

- name: Install ansys/pip-licenses main branch
shell: bash
env:
ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python --no-cache' || 'python -m pip install --no-cache-dir' }}
run: |
${ACTIVATE_VENV}
$INSTALL_COMMAND external/pip-licenses
$INSTALL_COMMAND -U pip -r ${GITHUB_ACTION_PATH}/requirements.txt

- name: "Check if specific target is requested"
id: specific-target-requested
Expand All @@ -307,7 +298,7 @@ runs:
ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
INSTALL_TARGET: ${{ steps.specific-target-requested.outputs.install_target }}
INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
run:
run: |
${ACTIVATE_VENV}
${INSTALL_COMMAND} "$INSTALL_TARGET"

Expand Down
3 changes: 3 additions & 0 deletions check-licenses/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pip-licenses==5.5.1
prettytable==3.17.0
wcwidth==0.6.0
1 change: 1 addition & 0 deletions doc/source/changelog/1166.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Revert to original pip licenses
Loading