examples: add Lit Triggers examples (release-attestation, uptime-insurance, chainlink-feed-mirror) #1240
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Contract Bindings Check | |
| on: | |
| push: | |
| branches: [main, next] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| contract-bindings: | |
| if: > | |
| github.event_name == 'push' || | |
| github.event.pull_request.head.repo.full_name == github.repository | |
| name: contract-bindings | |
| runs-on: self-hosted | |
| concurrency: | |
| group: foundry-toolchain | |
| cancel-in-progress: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Reset workspace to HEAD | |
| run: git checkout HEAD -- . | |
| - uses: dtolnay/rust-toolchain@1.91 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Check Foundry toolchain | |
| id: foundry-toolchain | |
| run: | | |
| if command -v forge >/dev/null 2>&1 && forge --version | grep -Eq '(^|[^0-9])1\.5\.1([^0-9]|$)'; then | |
| forge --version | |
| echo "installed=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "installed=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Install Foundry | |
| if: steps.foundry-toolchain.outputs.installed != 'true' | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| # Pinned for reproducibility. Bump intentionally when upgrading. | |
| version: v1.5.1 | |
| - name: Install contract dependencies | |
| working-directory: lit-api-server/blockchain/lit_node_express | |
| run: npm ci | |
| - name: Generate contract bindings | |
| working-directory: lit-api-server/blockchain/lit_node_express | |
| run: make generate | |
| - name: Check for uncommitted changes | |
| run: | | |
| git diff --exit-code -- lit-api-server/src/accounts/contracts/ || { | |
| echo "::error::Contract bindings are out of date. Run 'make generate' in lit-api-server/blockchain/lit_node_express/ and commit the changes." | |
| git diff --stat -- lit-api-server/src/accounts/contracts/ | |
| exit 1 | |
| } |