Files
alfresco-content-app/.github/actions/update-library-versions/action.yml
AleksanderSklorz 296789da22 [ACS-10124] Fix Change this action to not use user-controlled data directly in a run block sonar issue (#4810)
* [ACS-10124] Fix Change this action to not use user-controlled data directly in a run block sonar issue

* [ACS-10124] Corrected typo
2025-09-25 10:50:08 +02:00

29 lines
839 B
YAML

name: "Update Library Versions"
description: "Updates ACA libraries according to the root Version"
inputs:
branch_name:
description: 'Name of the branch the workflow runs on'
required: true
dry-run:
description: dry run flag
required: true
runs:
using: "composite"
steps:
- name: Update Versions
shell: bash
env:
BRANCH_NAME: ${{ inputs.branch_name }}
run: |
VERSION_IN_PACKAGE_JSON=$(jq -cr '.version' < package.json)
if [[ $BRANCH_NAME =~ ^master.*?$ ]] || [[ "$BRANCH_NAME" == release/* ]] ; then
NEW_LIBRARY_VERSION="$VERSION_IN_PACKAGE_JSON"
else
NEW_LIBRARY_VERSION="${VERSION_IN_PACKAGE_JSON}-${{ github.run_id }}"
fi
${{ github.action_path }}/update-lib-versions.sh "$NEW_LIBRARY_VERSION" "${{ inputs.dry-run }}"