diff --git a/.github/workflows/conan-package-resources.yml b/.github/workflows/conan-package-resources.yml index 3a56e61a9c..c6cef5c6d5 100644 --- a/.github/workflows/conan-package-resources.yml +++ b/.github/workflows/conan-package-resources.yml @@ -29,3 +29,32 @@ jobs: platform_mac: false install_system_dependencies: false secrets: inherit + + outputs: + package_version: ${{ steps.get-package-version.outputs.package_version }} + + steps: + - name: Extract Conan Package Version + id: get-package-version + run: | + # Replace this with your real logic to determine the package version + PACKAGE_VERSION=$(cat ./resources/conanfile.py | grep version | head -n 1 | cut -d '"' -f 2) + echo "Detected package version: $PACKAGE_VERSION" + echo "package_version=$PACKAGE_VERSION" >> $GITHUB_ENV + + # Set the package_version as an output + echo "::set-output name=package_version::$PACKAGE_VERSION" + + notify-dependent-package: + runs-on: ubuntu-latest + needs: conan-package # Ensures this job runs after conan-package completes! + + steps: + - name: Notify Dependent Repository + env: + GITHUB_TOKEN: ${{ secrets.DEPENDENT_REPO_TOKEN }} # Ensure token has correct scopes + run: | + curl -X POST -H "Authorization: token $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/DEPENDENT_ORG/DEPENDENT_REPO/dispatches \ + -d '{"event_type": "dependency-package-change", "client_payload": { "changed_dependency": "dependency-package", "version": "{{ needs.conan-package.outputs.package_version }}" }}' \ No newline at end of file