Skip to content

Commit

Permalink
feat: add ci flow to ping lit-configuration-guides to build
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansonhkg committed Oct 22, 2024
1 parent 6469580 commit 19934aa
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,34 @@ jobs:
run: docker stop shiva && docker rm shiva
- name: Post Pull Shiva Image
if: steps.shiva-pull.outputs.exit_code == 0
run: docker rmi ghcr.io/lit-protocol/shiva
run: docker rmi ghcr.io/lit-protocol/shiva
ping-lit-configuration-guides:
runs-on: ubuntu-latest
# needs: [unit-tests, integration-tests] # Make sure this job runs after others complete
steps:
- name: Get PR labels
id: pr-labels
uses: actions/github-script@v6
if: github.event_name == 'pull_request'
with:
script: |
const labels = context.payload.pull_request.labels
.map(label => label.name)
.filter(name => name.startsWith('tag:'))
.map(name => name.split(':')[1]);
const tag = labels.length > 0 ? labels[0] : 'alpha';
core.setOutput('tag', tag);
- name: Trigger dependencies bot in lit-configuration-guides
run: |
TAG="${{ steps.pr-labels.outputs.tag }}"
if [ -z "$TAG" ]; then
TAG="alpha" # Default to alpha if no tag found
fi
curl -X POST \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}" \
https://api.github.com/repos/LIT-Protocol/lit-configuration-guides/dispatches \
-d "{\"event_type\":\"dependency_update\", \"client_payload\": {\"labels\": [\"$TAG\"]}}"
env:
GH_PAT_LIT_CONFIGURATION_GUIDES_REPO: ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}

0 comments on commit 19934aa

Please sign in to comment.