diff --git a/.github/workflows/update-oss-pro-version-docs.yml b/.github/workflows/update-oss-pro-version-docs.yml index 75d483ff0..db7a1ea43 100644 --- a/.github/workflows/update-oss-pro-version-docs.yml +++ b/.github/workflows/update-oss-pro-version-docs.yml @@ -21,9 +21,9 @@ jobs: - name: Update docs run: | - LATEST_VERSION="${{ github.event.client_payload.latest_version }}" - PREVIOUS_VERSION="${{ github.event.client_payload.previous_version }}" - echo "Updating docs with OSS version: ${{ github.event.client_payload.latest_version }}" + LATEST_VERSION="${{ github.event.client_payload.latest_version || github.event.inputs.latest_version }} " + PREVIOUS_VERSION="${{ github.event.client_payload.previous_version || github.event.inputs.previous_version }}" + echo "Updating docs with OSS version: ${{ github.event.client_payload.latest_version || github.event.inputs.latest_version }}" sed -i "s/${PREVIOUS_VERSION}/${LATEST_VERSION}/g" ${{ github.workspace }}/Content/Z_Resources/Snippets/text/start-download-files.flsnp sed -i "s/${PREVIOUS_VERSION}/${LATEST_VERSION}/g" ${{ github.workspace }}/Project/VariableSets/software-versions.flvar @@ -32,6 +32,7 @@ jobs: git config --global user.email "liquibot@github.com" git config --global user.name "liquibot" git add . + git diff --cached --exit-code || exit 0 # Check if there are changes to commit git commit -m "Replace OSS and PRO ${{ github.event.client_payload.previous_version }} version with ${{ github.event.client_payload.latest_version }}" git push