From a6a76967c2983138e3191cd36bf11bee06d8ad41 Mon Sep 17 00:00:00 2001 From: Sai Kranthi <57343520+kranthicodes@users.noreply.github.com> Date: Thu, 25 Apr 2024 23:55:33 +0530 Subject: [PATCH] Create pl-sync.yml --- .github/workflows/pl-sync.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/pl-sync.yml diff --git a/.github/workflows/pl-sync.yml b/.github/workflows/pl-sync.yml new file mode 100644 index 0000000..fa6dd4a --- /dev/null +++ b/.github/workflows/pl-sync.yml @@ -0,0 +1,30 @@ +name: Protocol Land Sync +on: + # Run Manually: + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: 'Checkout repo (default branch)' + uses: actions/checkout@v3 + with: + # fetch all history for all branches: + fetch-depth: 0 + - name: 'Checkout all branches' + run: | + default_branch=$(git branch | grep '*' | sed 's/\* //') + for abranch in $(git branch -a | grep -v HEAD | grep remotes | sed "s/remotes\/origin\///g"); do git checkout $abranch ; done + git checkout $default_branch + git branch -a + - name: 'Setup node 18' + uses: actions/setup-node@v3 + with: + node-version: 18.x + - name: 'Sync repo to Protocol Land' + run: npx @protocol.land/sync + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO_TITLE: ${{ github.event.repository.name }} + REPO_DESCRIPTION: ${{ github.event.repository.description }} + WALLET: ${{ secrets.WALLET }}