Skip to content

[Feature] sc-30601 Add new Github action by PipeRider Compare Action #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/piperider-compare-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: PipeRider Compare Action

on:
pull_request:
branches:
- main

jobs:
piperider-compare-action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main

- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Set up dbt + PipeRider
run: |
pip install -r requirements.txt

- name: Clone git repo ${{ vars.GIT_REPO_URL }}
run: |
url=${{ vars.GIT_REPO_URL }}
git clone $url git_repo

- name: Read git repo commits
run: |
python3 read_git_repo.py

- name: Debug
run: |
pwd
ls -la
ls -la .piperider
ls -la .piperider/compare

- name: PipeRider Compare Action - Upload and Share to PipeRider Cloud Staging
uses: InfuseAI/piperider-compare-action@v1
env:
PIPERIDER_API_SERVICE: https://staging.cloud.piperider.io
with:
cloud_project: ${{ vars.PIPERIDER_CLOUD_PROJECT }}
cloud_api_token: ${{ secrets.PIPERIDER_CLOUD_TOKEN }}
upload: true
share: true
recipe: default
15 changes: 15 additions & 0 deletions .piperider/compare/default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
base:
branch: main
dbt:
commands:
- dbt deps
- dbt build
piperider:
command: piperider run
target:
dbt:
commands:
- dbt deps
- dbt build
piperider:
command: piperider run