1
1
name : Deploy
2
2
3
- env :
4
- AZURE_CONTAINER_REGISTRY : MY_REGISTRY_NAME # set this to the name of your container registry
5
- PROJECT_NAME : MY_PROJECT_NAME # set this to your project's name
6
- RESOURCE_GROUP : invenio-dev # the resource group containing your AKS cluster
7
- CLUSTER_NAME : InvenioRDM-Dev # the name of your AKS cluster
8
- CHART_PATH : " ~/helm-invenio/charts/invenio/Chart.yml" # set this to the path to your helm file
9
- CHART_OVERRIDE_PATH : " ~/helm-invenio/charts/invenio/values-overrides-imperial.yaml" # array of override file paths
10
-
11
3
on :
12
- workflow_run :
13
- workflows : [Build and Publish] # Only run this once Build and Publish has succeeded (image is available)
14
- types : [completed]
15
- branches : [develop, feature/actions_deploy] # Only deploy develop branch to our CI dev instance
4
+ push :
5
+ branches :
6
+ - feature/actions_deploy
7
+ # workflow_run:
8
+ # workflows: [Build and Publish] # Only run this once Build and Publish has succeeded (image is available)
9
+ # types: [completed]
10
+ # branches: [develop, feature/actions_deploy] # Only deploy develop branch to our CI dev instance
16
11
17
12
permissions :
18
- id-token : write # for Azure OIDC, see https://github.com/Azure/login
13
+ id-token : write
19
14
contents : read
15
+ actions : read
20
16
21
17
jobs :
22
18
deploy :
23
- if : ${{ github.event.workflow_run.conclusion == 'success' }}
19
+ # if: ${{ github.event.workflow_run.conclusion == 'success' }}
24
20
runs-on : ubuntu-latest
21
+ environment : develop
25
22
steps :
26
23
- name : checkout the Helm charts to deploy our published instance
27
24
uses : actions/checkout@v4
28
25
with :
29
- repository : ImperialCollegeLondon/helm-invenio # Currently public, need to add a token if set to private
30
- token : ${{ secrets.TOKEN_TO_PULL_HELM_REPO }}
31
- fetch-depth : 0
26
+ repository : ImperialCollegeLondon/helm-invenio
27
+ path : helm-invenio
28
+ ref : imperial_deployment
32
29
33
30
- name : Login to Azure to deploy our chart
34
31
uses : azure/login@v2
@@ -38,16 +35,32 @@ jobs:
38
35
- name : Gets K8s context
39
36
uses : azure/aks-set-context@v4
40
37
with :
41
- creds : ${{ secrets.AZURE_CREDENTIALS }}
42
- resource-group : ${{ env.RESOURCE_GROUP }}
43
- cluster-name : ${{ env.CLUSTER_NAME }}
38
+ resource-group : ${{ vars.RESOURCE_GROUP }}
39
+ cluster-name : ${{ vars.CLUSTER_NAME }}
44
40
id : login
45
41
46
42
- name : Configure deployment
47
- uses : azure/k8s-bake@61041e8c2f75c1f01186c8f05fb8b24e1fc507d8
43
+ uses : azure/k8s-bake@v3
48
44
with :
49
- renderEngine : ' helm'
50
- helmChart : ${{ env.CHART_PATH }}
51
- overrideFiles : ${{ env.CHART_OVERRIDE_PATH }}
52
- helm-version : ' latest'
45
+ renderEngine : " helm"
46
+ helmChart : ${{ vars.CHART_PATH }}
47
+ overrideFiles : ${{ vars.CHART_OVERRIDE_PATH }}
48
+ helm-version : " latest"
49
+ releaseName : " develop"
50
+ namespace : invenio
51
+ overrides : |
52
+ invenio.secret_key: ${{ secrets.INVENIO_SECRET_KEY }}
53
+ invenio.security_login_salt: ${{ secrets.INVENIO_SECURITY_LOGIN_SALT }}
54
+ invenio.csrf_secret_salt: ${{ secrets.INVENIO_CSRF_SECRET_SALT }}
55
+ invenio.extraConfig.ICL_OAUTH_CLIENT_ID: ${{ vars.ICL_OAUTH_CLIENT_ID }}
56
+ invenio.extraConfig.ICL_OAUTH_CLIENT_SECRET: ${{ secrets.ICL_OAUTH_CLIENT_SECRET }}
57
+ invenio.extraConfig.ICL_OAUTH_WELL_KNOWN_URL: ${{ vars.ICL_OAUTH_WELL_KNOWN_URL }}
58
+ rabbitmq.auth.password: ${{ secrets.RABBITMQ_AUTH_PASSWORD }}
59
+ postgresql.auth.password: ${{ secrets.POSTGRESQL_AUTH_PASSWORD }}
60
+ invenio.web.image: ${{ vars.IMAGE_NAME }}
53
61
id : bake
62
+ - name : Deploys application
63
+ uses : Azure/k8s-deploy@v5
64
+ with :
65
+ manifests : ${{ steps.bake.outputs.manifestsBundle }}
66
+ namespace : invenio
0 commit comments