-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathexample-workflow.yaml
48 lines (40 loc) · 1.3 KB
/
example-workflow.yaml
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
name: Deploy Decodable resources
on:
push:
branches:
- main
# pull_request:
workflow_dispatch:
jobs:
setup-and-apply:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Download and unpack the Decodable CLI
run: |
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 && \
tar -xzf /tmp/decodable-cli.tar.gz -C /tmp && \
sudo mv /tmp/decodable-cli-linux-amd64-1.20.0/bin/decodable /usr/local/bin && \
rm -r /tmp/decodable-cli.tar.gz /tmp/decodable-cli-linux-amd64-1.20.0
- name: Create Decodable CLI auth file
run: |
mkdir -p ~/.decodable
cat <<EOF > ~/.decodable/auth
version: 1.0.0
tokens:
default:
refresh_token: ${{ secrets.DECODABLE_REFRESH_TOKEN }}
EOF
- name: Create Decodable CLI config file
run: |
mkdir -p ~/.decodable
cat <<EOF > ~/.decodable/config
version: 1.0.0
active-profile: default
profiles:
default:
account: ${{ vars.DECODABLE_ACCOUNT_NAME }}
EOF
- name: Apply all Decodable resources
run: decodable apply $(find declarative-cicd -name '*.yaml')