@@ -106,4 +106,34 @@ jobs:
106106 run : docker stop shiva && docker rm shiva
107107 - name : Post Pull Shiva Image
108108 if : steps.shiva-pull.outputs.exit_code == 0
109- run : docker rmi ghcr.io/lit-protocol/shiva
109+ run : docker rmi ghcr.io/lit-protocol/shiva
110+ ping-lit-configuration-guides :
111+ runs-on : ubuntu-latest
112+ # needs: [unit-tests, integration-tests] # Make sure this job runs after others complete
113+ steps :
114+ - name : Get PR labels
115+ id : pr-labels
116+ uses : actions/github-script@v6
117+ if : github.event_name == 'pull_request'
118+ with :
119+ script : |
120+ const labels = context.payload.pull_request.labels
121+ .map(label => label.name)
122+ .filter(name => name.startsWith('tag:'))
123+ .map(name => name.split(':')[1]);
124+ if (labels.length > 0) {
125+ core.setOutput('tag', labels[0]);
126+ } else {
127+ core.setOutput('skip', 'true');
128+ }
129+ - name : Trigger dependencies bot in lit-configuration-guides
130+ if : steps.pr-labels.outputs.skip != 'true'
131+ run : |
132+ TAG="${{ steps.pr-labels.outputs.tag }}"
133+ curl -X POST \
134+ -H "Accept: application/vnd.github.everest-preview+json" \
135+ -H "Authorization: token ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}" \
136+ https://api.github.com/repos/LIT-Protocol/lit-configuration-guides/dispatches \
137+ -d "{\"event_type\":\"dependency_update\", \"client_payload\": {\"labels\": [\"$TAG\"]}}"
138+ env :
139+ GH_PAT_LIT_CONFIGURATION_GUIDES_REPO : ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}
0 commit comments