-
Notifications
You must be signed in to change notification settings - Fork 12
79 lines (69 loc) · 2.45 KB
/
deploy-rollup-holesky.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Deploy to rollup-holesky
on:
workflow_dispatch:
permissions:
contents: read
id-token: write
deployments: write
jobs:
init:
name: Set global version
runs-on: ubuntu-24.04
outputs:
GLOBAL_VERSION: ${{ steps.set_vars.outputs.GLOBAL_VERSION }}
steps:
- name: Set global version
id: set_vars
run: echo "GLOBAL_VERSION=${{ github.sha }}" >> $GITHUB_OUTPUT
build-and-test:
needs: [init]
name: Build
uses: ./.github/workflows/reusable-build-and-test.yml
secrets: inherit
with:
version: ${{ needs.init.outputs.GLOBAL_VERSION }}
deploy-rollup-holesky:
needs: [init, build-and-test]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: jkroepke/[email protected]
- name: Setup helmfile
uses: mamezou-tech/[email protected]
with:
install-kubectl: no
install-helm: no
additional-helm-plugins: https://github.com/jkroepke/helm-secrets --version v4.1.1,https://github.com/aslafy-z/helm-git --version 0.14.0
- uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- name: Set up GKE credentials
uses: google-github-actions/[email protected]
with:
cluster_name: mangata-dev-alpha
location: europe-west1
- name: Create a GitHub Deployment
uses: bobheadxi/[email protected]
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: holesky
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
- run: |
export ENVIRONMENT=holesky
export IMAGE_TAG=${{ needs.init.outputs.GLOBAL_VERSION }}
# https://dev.to/derlin/helmfile-difference-between-sync-and-apply-helm-3-28o1
export HELM_DIFF_THREE_WAY_MERGE=true
helmfile apply -e holesky
working-directory: ops/helmfiles
- name: Update the GitHub Deployment status
uses: bobheadxi/[email protected]
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
env: ${{ steps.deployment.outputs.env }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}