Skip to content

Commit 19934aa

Browse files
committed
feat: add ci flow to ping lit-configuration-guides to build
1 parent 6469580 commit 19934aa

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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+
const tag = labels.length > 0 ? labels[0] : 'alpha';
125+
core.setOutput('tag', tag);
126+
127+
- name: Trigger dependencies bot in lit-configuration-guides
128+
run: |
129+
TAG="${{ steps.pr-labels.outputs.tag }}"
130+
if [ -z "$TAG" ]; then
131+
TAG="alpha" # Default to alpha if no tag found
132+
fi
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

Comments
 (0)