From 95ebcdaee53d1f5953bf0942480d6d152d81ae0a Mon Sep 17 00:00:00 2001 From: Karan Popat Date: Fri, 7 Jun 2024 16:05:53 +0530 Subject: [PATCH 1/5] test empty commit From 82f43229f7bae417bdfac119261c7b1fe8ed1198 Mon Sep 17 00:00:00 2001 From: Karan Popat Date: Fri, 7 Jun 2024 16:20:55 +0530 Subject: [PATCH 2/5] add workflow to trigger preview builds --- .github/workflows/trigger-flowpipe-io.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/trigger-flowpipe-io.yml diff --git a/.github/workflows/trigger-flowpipe-io.yml b/.github/workflows/trigger-flowpipe-io.yml new file mode 100644 index 0000000..9302a67 --- /dev/null +++ b/.github/workflows/trigger-flowpipe-io.yml @@ -0,0 +1,20 @@ +name: Trigger the preview build in flowpipe.io + +on: + workflow_dispatch: + + push: + branches-ignore: + - "main" + +jobs: + update: + runs-on: ubuntu-latest + steps: + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@v2 + with: + token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }} + repository: turbotio/flowpipe.io + event-type: build-preview + client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "ref_name": "${{ github.ref_name }}"}' From e132bbf234e871ed6f4491ef62eff7ceac79c051 Mon Sep 17 00:00:00 2001 From: Karan Popat Date: Mon, 17 Jun 2024 11:46:51 +0530 Subject: [PATCH 3/5] test docs preview deployment --- docs/learn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/learn.md b/docs/learn.md index 55f7512..10e61ed 100644 --- a/docs/learn.md +++ b/docs/learn.md @@ -7,7 +7,7 @@ slug: / # Learn Flowpipe -Flowpipe allows you to create "pipelines as code" to define workflows and other tasks that run in a sequence. +Testing flowpipe allows you to create "pipelines as code" to define workflows and other tasks that run in a sequence. ## Creating your first pipeline From c83e277dcd5c876a07746c8f4ff75661a355ec2c Mon Sep 17 00:00:00 2001 From: Karan Popat Date: Mon, 17 Jun 2024 11:56:32 +0530 Subject: [PATCH 4/5] test docs preview deployment --- docs/learn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/learn.md b/docs/learn.md index 10e61ed..b5c29dc 100644 --- a/docs/learn.md +++ b/docs/learn.md @@ -7,7 +7,7 @@ slug: / # Learn Flowpipe -Testing flowpipe allows you to create "pipelines as code" to define workflows and other tasks that run in a sequence. +Testing again flowpipe allows you to create "pipelines as code" to define workflows and other tasks that run in a sequence. ## Creating your first pipeline From 37bee42c42f1b805ca1458cc4f714845b05a16ab Mon Sep 17 00:00:00 2001 From: Karan Popat Date: Mon, 17 Jun 2024 12:37:23 +0530 Subject: [PATCH 5/5] test docs preview deployment --- .github/workflows/trigger-flowpipe-io.yml | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/trigger-flowpipe-io.yml b/.github/workflows/trigger-flowpipe-io.yml index 9302a67..a7a06a4 100644 --- a/.github/workflows/trigger-flowpipe-io.yml +++ b/.github/workflows/trigger-flowpipe-io.yml @@ -7,9 +7,16 @@ on: branches-ignore: - "main" + pull_request: + types: [opened, reopened, synchronize, closed] + +env: + PREVIEW_DOMAIN: turbot.vercel.app + jobs: update: runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' }} steps: - name: Repository Dispatch uses: peter-evans/repository-dispatch@v2 @@ -18,3 +25,26 @@ jobs: repository: turbotio/flowpipe.io event-type: build-preview client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "ref_name": "${{ github.ref_name }}"}' + + comment-link: + runs-on: ubuntu-latest + timeout-minutes: 5 + if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }} + steps: + + - name: Convert head branch special characters to hyphens + id: sanitize_branch + run: | + sanitized_branch=$(echo "${{ github.event.pull_request.head.ref }}" | sed 's/[^a-zA-Z0-9]/-/g') + echo "Sanitized head branch: $sanitized_branch" + echo "::set-output name=sanitized_branch::$sanitized_branch" + + - uses: actions/github-script@v7 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Preview link: [https://flowpipe-io-git-${{ steps.sanitize_branch.outputs.sanitized_branch }}-${{ env.PREVIEW_DOMAIN }}](https://flowpipe-io-git-${{ steps.sanitize_branch.outputs.sanitized_branch }}-${{ env.PREVIEW_DOMAIN }}/)' + }) \ No newline at end of file