diff --git a/.github/workflows/trigger-flowpipe-io.yml b/.github/workflows/trigger-flowpipe-io.yml new file mode 100644 index 0000000..a7a06a4 --- /dev/null +++ b/.github/workflows/trigger-flowpipe-io.yml @@ -0,0 +1,50 @@ +name: Trigger the preview build in flowpipe.io + +on: + workflow_dispatch: + + push: + 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 + 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 }}"}' + + 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 diff --git a/docs/learn.md b/docs/learn.md index 55f7512..b5c29dc 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 again flowpipe allows you to create "pipelines as code" to define workflows and other tasks that run in a sequence. ## Creating your first pipeline