You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[[ "${{ secrets.tb_admin_token }}" ]] || { echo "Go to the tokens section in your Workspace, copy the 'admin token ([email protected])' associated to a user account and set TB_ADMIN_TOKEN as a Secret in your Git repository"; exit 1; }
[[ "${{ secrets.tb_admin_token }}" ]] || { echo "Go to the tokens section in your Workspace, copy the 'admin token ([email protected])' associated to a user account and set TB_ADMIN_TOKEN as a Secret in your Git repository"; exit 1; }
[[ "${{ secrets.tb_admin_token }}" ]] || { echo "Go to the tokens section in your Workspace, copy the 'admin token ([email protected])' associated to a user account and set TB_ADMIN_TOKEN as a Secret in your Git repository"; exit 1; }
description: "relative path of the folder containing the data project"
13
+
required: false
14
+
type: string
15
+
default: .
16
+
secrets:
17
+
tb_admin_token:
18
+
required: true
19
+
tb_host:
20
+
required: true
21
+
22
+
jobs:
23
+
promote:
24
+
if: inputs.job_to_run == 'promote'
25
+
runs-on: ubuntu-latest
26
+
defaults:
27
+
run:
28
+
working-directory: ${{ inputs.data_project_dir }}
29
+
steps:
30
+
- uses: actions/checkout@master
31
+
- uses: actions/setup-python@v3
32
+
with:
33
+
python-version: "3.8"
34
+
architecture: "x64"
35
+
36
+
- name: Validate input
37
+
run: |
38
+
[[ "${{ secrets.tb_admin_token }}" ]] || { echo "Go to the tokens section in your Workspace, copy the 'admin token ([email protected])' associated to a user account and set TB_ADMIN_TOKEN as a Secret in your Git repository"; exit 1; }
39
+
- name: Install Tinybird CLI
40
+
run: |
41
+
if [ -f "requirements.txt" ]; then
42
+
pip install -r requirements.txt
43
+
else
44
+
pip install tinybird-cli
45
+
fi
46
+
- name: Tinybird version
47
+
run: tb --version
48
+
49
+
- name: Promote Release
50
+
run: |
51
+
source .tinyenv
52
+
tb \
53
+
--host ${{ secrets.tb_host }} \
54
+
--token ${{ secrets.tb_admin_token }} \
55
+
release promote \
56
+
--semver $VERSION
57
+
rollback:
58
+
runs-on: ubuntu-latest
59
+
if: inputs.job_to_run == 'rollback'
60
+
defaults:
61
+
run:
62
+
working-directory: ${{ inputs.data_project_dir }}
63
+
steps:
64
+
- uses: actions/checkout@master
65
+
- uses: actions/setup-python@v3
66
+
with:
67
+
python-version: "3.8"
68
+
architecture: "x64"
69
+
70
+
- name: Validate input
71
+
run: |
72
+
[[ "${{ secrets.tb_admin_token }}" ]] || { echo "Go to the tokens section in your Workspace, copy the 'admin token ([email protected])' associated to a user account and set TB_ADMIN_TOKEN as a Secret in your Git repository"; exit 1; }
73
+
- name: Install Tinybird CLI
74
+
run: |
75
+
if [ -f "requirements.txt" ]; then
76
+
pip install -r requirements.txt
77
+
else
78
+
pip install tinybird-cli
79
+
fi
80
+
- name: Tinybird version
81
+
run: tb --version
82
+
83
+
- name: Promote Release
84
+
run: |
85
+
source .tinyenv
86
+
tb \
87
+
--host ${{ secrets.tb_host }} \
88
+
--token ${{ secrets.tb_admin_token }} \
89
+
release rollback
90
+
rm:
91
+
runs-on: ubuntu-latest
92
+
if: inputs.job_to_run == 'rm'
93
+
defaults:
94
+
run:
95
+
working-directory: ${{ inputs.data_project_dir }}
96
+
steps:
97
+
- uses: actions/checkout@master
98
+
- uses: actions/setup-python@v3
99
+
with:
100
+
python-version: "3.8"
101
+
architecture: "x64"
102
+
103
+
- name: Validate input
104
+
run: |
105
+
[[ "${{ secrets.tb_admin_token }}" ]] || { echo "Go to the tokens section in your Workspace, copy the 'admin token ([email protected])' associated to a user account and set TB_ADMIN_TOKEN as a Secret in your Git repository"; exit 1; }
0 commit comments