-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) · 1.66 KB
/
sync-examples-light-token.yml
File metadata and controls
46 lines (39 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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' }}