mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 05:55:53 +08:00
Add extract-package-version job to workflow
NP-732
This commit is contained in:
parent
26eb14bac1
commit
7fb47466ed
13
.github/workflows/conan-package-resources.yml
vendored
13
.github/workflows/conan-package-resources.yml
vendored
@ -30,6 +30,9 @@ jobs:
|
||||
install_system_dependencies: false
|
||||
secrets: inherit
|
||||
|
||||
extract-package-version:
|
||||
runs-on: ubuntu-latest
|
||||
needs: conan-package
|
||||
outputs:
|
||||
package_version: ${{ steps.get-package-version.outputs.package_version }}
|
||||
|
||||
@ -40,21 +43,21 @@ jobs:
|
||||
# Replace this with your real logic to determine the package version
|
||||
PACKAGE_VERSION=$(cat ./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
|
||||
# Set the package_version as an output for this job
|
||||
echo "::set-output name=package_version::$PACKAGE_VERSION"
|
||||
|
||||
# Job 3: Notify the dependent repository
|
||||
notify-dependent-package:
|
||||
runs-on: ubuntu-latest
|
||||
needs: conan-package # Ensures this job runs after conan-package completes!
|
||||
needs: extract-package-version # This ensures that it runs after extract-package-version
|
||||
|
||||
steps:
|
||||
- name: Notify Dependent Repository
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.DEPENDENT_REPO_TOKEN }} # Ensure token has correct scopes
|
||||
GITHUB_TOKEN: ${{ secrets.DEPENDENT_REPO_TOKEN }}
|
||||
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 }}" }}'
|
||||
-d '{"event_type": "dependency-package-change", "client_payload": { "changed_dependency": "dependency-package", "version": "${{ needs.extract-package-version.outputs.package_version }}" }}'
|
Loading…
x
Reference in New Issue
Block a user