-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (59 loc) · 1.75 KB
/
Copy pathdeploy.yml
File metadata and controls
60 lines (59 loc) · 1.75 KB
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
55
56
57
58
59
60
name: Deploy Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
CI: true
jobs:
pulumi-deploy-dev:
environment: development
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- run: npm install
- name: Decode kubeconfig
run: |
mkdir -p $HOME/.kube
echo "${{ secrets.KUBE_CONFIG }}" | base64 -d > $HOME/.kube/config
cat $HOME/.kube/config
shell: bash
- name: Deploy with Pulumi
uses: pulumi/actions@v6
with:
command: up
stack-name: openstack
work-dir: flux-operator
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
versionTag: ${{ github.head_ref || github.ref_name }}
pulumi-deploy-prod:
environment: prod
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- run: npm install
- name: setup kubectl
uses: actions-hub/kubectl@v1.34.3
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
- name: Decode kubeconfig
run: |
mkdir -p $HOME/.kube
echo "${{ secrets.KUBE_CONFIG }}" | base64 -d > $HOME/.kube/config
cat $HOME/.kube/config
shell: bash
- name: Get current Version in pulumi config
run: |
echo "PREVIOUS_VERSION=kubectl get stacks -n flux-system l1 -o jsonpath='{.spec.branch}' | awk -F'/' '{print $NF}'" >> $GITHUB_ENV
- name: Deploy with Pulumi
uses: pulumi/actions@v6
with:
command: up
stack-name: hetzner
work-dir: flux-operator
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
versionTag: ${{ github.head_ref || github.ref_name }}