-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (52 loc) · 1.8 KB
/
sqlmesh.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: SQLMesh Bot
run-name: 🧃 SQLMesh Bot 🧃
on:
pull_request:
types:
- synchronize
- opened
# Required if using comments to issue commands to the bot
# issue_comment:
# types:
# - created
# Required if using required approvers to automate deployments
pull_request_review:
types:
- edited
- submitted
- dismissed
# The latest commit is the one that will be used to create the PR environment and deploy to production
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
sqlmesh:
name: SQLMesh Actions Workflow
runs-on: ubuntu-latest
permissions:
# Required to access code in PR
contents: write
# Required to post comments
issues: write
# Required to update check runs
checks: write
# Required to merge
pull-requests: write
steps:
- name: Setup Python
uses: actions/setup-python@v4
- name: Checkout PR branch
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.pull_request && github.event.issue.number || github.event.pull_request.number }}/merge
- name: Install SQLMesh + Dependencies
run: pip install -r requirements.txt
shell: bash
- name: Run CI/CD Bot
run: |
sqlmesh_cicd -p ${{ github.workspace }} github --token ${{ secrets.GITHUB_TOKEN }} run-all
env: # TODO: update your GitHub secrets to include SQLMESH_STATE_HOST, SQLMESH_STATE_USERNAME, SQLMESH_STATE_PASSWORD
SQLMESH_STATE_HOST: ${{ secrets.SQLMESH_STATE_HOST }}
SQLMESH_STATE_USERNAME: ${{ secrets.SQLMESH_STATE_USERNAME }}
SQLMESH_STATE_PASSWORD: ${{ secrets.SQLMESH_STATE_PASSWORD }}
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}