Triggered Governance Checks #4682
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: Triggered Governance Checks | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| chainId: | |
| description: "On which networkId are the payloads deployed" | |
| type: string | |
| required: true | |
| ids: | |
| description: "Comma separated list of ids" | |
| type: string | |
| required: true | |
| payloadsController: | |
| description: "Address of the payloadsController" | |
| type: string | |
| required: true | |
| origin: | |
| description: "Self-description of the origin" | |
| type: string | |
| required: false | |
| jobs: | |
| trigger: | |
| concurrency: | |
| group: ${{ github.workflow }} ${{ inputs.type || 'proposal' }} ${{ inputs.chainId }} ${{ inputs.ids }} | |
| name: Triggered proposal check | |
| runs-on: ubuntu-latest | |
| env: | |
| # FOUNDRY_PROFILE: ci | |
| ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | |
| TENDERLY_ACCESS_TOKEN: ${{ secrets.TENDERLY_ACCESS_TOKEN }} | |
| TENDERLY_PROJECT_SLUG: ${{ secrets.TENDERLY_PROJECT_SLUG }} | |
| TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }} | |
| VERBOSE: true | |
| steps: | |
| - name: log inputs | |
| run: echo "${{ toJSON(inputs) }}" | |
| - name: wait | |
| uses: softprops/turnstyle@807f6009e7cee5c2c9faa41ccef03a8bb24b06ab # 2.4.0 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| ref: ${{ github.event.repository.default_branch }} | |
| - uses: bgd-labs/github-workflows/.github/actions/setup-node@main | |
| - uses: bgd-labs/action-rpc-env@main | |
| with: | |
| ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }} | |
| QUICKNODE_TOKEN: ${{ secrets.QUICKNODE_TOKEN }} | |
| QUICKNODE_ENDPOINT_NAME: ${{ secrets.QUICKNODE_ENDPOINT_NAME }} | |
| - name: Install Foundry | |
| uses: bgd-labs/foundry-zksync-toolchain@340cea9a42119d9a77a6bb0a8236d4311582b709 | |
| with: | |
| version: nightly | |
| - name: tree building | |
| run: bun run ci:tree | |
| - name: Trigger | |
| id: external-trigger | |
| run: bun run ci:simulate --chainId ${{ inputs.chainId }} --ids ${{ inputs.ids }} --payloadsController ${{ inputs.payloadsController}} | |
| - name: check diff | |
| run: | | |
| if [[ -z $(git status reports -s) ]] | |
| then | |
| echo "tree is clean" | |
| else | |
| git config --global user.name 'Cache bot' | |
| git config --global user.email '[email protected]' | |
| git add reports | |
| git restore . | |
| git commit -am "fix(cache): automatic cache update :robot:" | |
| git push | |
| exit | |
| fi | |
| - name: Post to a Slack channel | |
| id: slack | |
| if: failure() | |
| uses: slackapi/[email protected] | |
| with: | |
| # Slack channel id, channel name, or user id to post message. | |
| # See also: https://api.slack.com/methods/chat.postMessage#channels | |
| channel-id: "C068J77L8JG" | |
| # For posting a rich message using Block Kit | |
| payload: | | |
| { | |
| "text": "GitHub Action build result: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", | |
| "blocks": [ | |
| { | |
| "type": "section", | |
| "text": { | |
| "type": "mrkdwn", | |
| "text": "GitHub Action build result: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
| } | |
| } | |
| ] | |
| } | |
| env: | |
| SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |