sync-examples-light-token #2
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: Sync Examples Light Token | |
| on: | |
| repository_dispatch: | |
| types: [sync-examples-light-token] | |
| workflow_dispatch: | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout docs repo | |
| uses: actions/checkout@v4 | |
| - name: Checkout examples repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Lightprotocol/examples-light-token | |
| path: examples-light-token | |
| ref: ${{ github.event.client_payload.commit || 'main' }} | |
| - name: Run snippet sync scripts | |
| env: | |
| EXAMPLES_LIGHT_TOKEN: ${{ github.workspace }}/examples-light-token | |
| run: | | |
| chmod +x ./scripts/copy-light-token-snippets.sh | |
| chmod +x ./scripts/copy-rust-snippets.sh | |
| chmod +x ./scripts/copy-program-snippets.sh | |
| chmod +x ./scripts/copy-sponsor-top-ups-snippets.sh | |
| ./scripts/copy-light-token-snippets.sh | |
| ./scripts/copy-rust-snippets.sh | |
| ./scripts/copy-program-snippets.sh | |
| ./scripts/copy-sponsor-top-ups-snippets.sh | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| branch: auto-sync/examples-light-token | |
| delete-branch: true | |
| title: "chore: sync code snippets from examples-light-token" | |
| commit-message: "chore: sync snippets from examples-light-token@${{ github.event.client_payload.commit || 'manual' }}" | |
| body: | | |
| Auto-generated by [sync workflow](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}). | |
| Source commit: Lightprotocol/examples-light-token@${{ github.event.client_payload.commit || 'manual dispatch' }} |