File tree Expand file tree Collapse file tree 5 files changed +92
-0
lines changed Expand file tree Collapse file tree 5 files changed +92
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ _Decodable provides a managed PyFlink service. Learn more [here](https://docs.de
89
89
90
90
| Example | Description |
91
91
| -------------------------------------------------------| -------------|
92
+ | [ Decodable CI/CD] ( declarative-cicd ) | An example of using Decodable with GitHub Actions|
92
93
| [ Decodable CLI Docker image] ( cli-docker ) | An example Dockerfile for running the Decodable CLI under Docker.|
93
94
94
95
## License
Original file line number Diff line number Diff line change
1
+ = Using Decodable with GitHub Actions
2
+
3
+ The folder shows an example of how you can integrate Decodable with your CICD workflow using GitHub Actions.
4
+
5
+ Refer to https://docs.decodable.co/cli/integrate-with-github-actions.html[the documentation page] for details.
Original file line number Diff line number Diff line change
1
+ ---
2
+ kind : connection
3
+ metadata :
4
+ name : datagen-01
5
+ description : " "
6
+ spec_version : v2
7
+ spec :
8
+ connector : datagen
9
+ type : source
10
+ stream_name : envoy
11
+ schema_v2 :
12
+ fields :
13
+ - kind : physical
14
+ name : message
15
+ type : STRING
16
+ constraints : {}
17
+ properties :
18
+ delay : " 5000"
19
+ format : json
20
+ data.type : envoy
21
+ execution :
22
+ active : true
23
+ task_count : 1
24
+ task_size : M
25
+
Original file line number Diff line number Diff line change
1
+ name : Deploy Decodable resources
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ # pull_request:
8
+ workflow_dispatch :
9
+
10
+ jobs :
11
+ setup-and-apply :
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - name : Checkout repository
16
+ uses : actions/checkout@v2
17
+
18
+ - name : Download and unpack the Decodable CLI
19
+ run : |
20
+ curl -L https://releases.decodable.co/decodable-cli/linux/amd64/decodable-cli-linux-amd64-1.20.0.tar.gz -o /tmp/decodable-cli.tar.gz && \
21
+ tar -xzf /tmp/decodable-cli.tar.gz -C /tmp && \
22
+ sudo mv /tmp/decodable-cli-linux-amd64-1.20.0/bin/decodable /usr/local/bin && \
23
+ rm -r /tmp/decodable-cli.tar.gz /tmp/decodable-cli-linux-amd64-1.20.0
24
+
25
+ - name : Create Decodable CLI auth file
26
+ run : |
27
+ mkdir -p ~/.decodable
28
+ cat <<EOF > ~/.decodable/auth
29
+ version: 1.0.0
30
+ tokens:
31
+ default:
32
+ refresh_token: ${{ secrets.DECODABLE_REFRESH_TOKEN }}
33
+ EOF
34
+
35
+ - name : Create Decodable CLI config file
36
+ run : |
37
+ mkdir -p ~/.decodable
38
+ cat <<EOF > ~/.decodable/config
39
+ version: 1.0.0
40
+ active-profile: default
41
+
42
+ profiles:
43
+ default:
44
+ account: ${{ vars.DECODABLE_ACCOUNT_NAME }}
45
+ EOF
46
+
47
+ - name : Apply all Decodable resources
48
+ run : decodable apply $(find declarative-cicd -name '*.yaml')
Original file line number Diff line number Diff line change
1
+ ---
2
+ kind : pipeline
3
+ metadata :
4
+ name : count-messages
5
+ description : " "
6
+ spec_version : v2
7
+ spec :
8
+ type : SQL
9
+ sql : INSERT INTO msg_count SELECT COUNT(*) AS ct FROM envoy
10
+ execution :
11
+ active : false
12
+ task_count : 1
13
+ task_size : M
You can’t perform that action at this time.
0 commit comments