Skip to content

Commit 2a15e2c

Browse files
authored
Create main.yml for protocolLand
1 parent 93812b7 commit 2a15e2c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Protocol Land Sync
2+
on:
3+
# Run with every push to 'main' branch:
4+
push:
5+
branches:
6+
- 'main'
7+
# Run Manually:
8+
#workflow_dispatch:
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: 'Checkout repo (default branch)'
14+
uses: actions/checkout@v3
15+
with:
16+
# fetch all history for all branches:
17+
fetch-depth: 0
18+
- name: 'Checkout all branches'
19+
run: |
20+
default_branch=$(git branch | grep '*' | sed 's/\* //')
21+
for abranch in $(git branch -a | grep -v HEAD | grep remotes | sed "s/remotes\/origin\///g"); do git checkout $abranch ; done
22+
git checkout $default_branch
23+
git branch -a
24+
- name: 'Setup node 18'
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: 18.x
28+
- name: 'Sync repo to Protocol Land'
29+
run: npx @protocol.land/sync
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
REPO_TITLE: ${{ github.event.repository.name }}
33+
REPO_DESCRIPTION: ${{ github.event.repository.description }}
34+
WALLET: ${{ secrets.WALLET }}

0 commit comments

Comments
 (0)