Skip to content

Commit a341b45

Browse files
committed
First pass at fully configured worflow
1 parent d35996d commit a341b45

File tree

1 file changed

+38
-25
lines changed

1 file changed

+38
-25
lines changed

.github/workflows/deploy.yml

+38-25
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
11
name: Deploy
22

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-
113
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
1611

1712
permissions:
18-
id-token: write # for Azure OIDC, see https://github.com/Azure/login
13+
id-token: write
1914
contents: read
15+
actions: read
2016

2117
jobs:
2218
deploy:
23-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
19+
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
2420
runs-on: ubuntu-latest
21+
environment: develop
2522
steps:
2623
- name: checkout the Helm charts to deploy our published instance
2724
uses: actions/checkout@v4
2825
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
3229

3330
- name: Login to Azure to deploy our chart
3431
uses: azure/login@v2
@@ -38,16 +35,32 @@ jobs:
3835
- name: Gets K8s context
3936
uses: azure/aks-set-context@v4
4037
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 }}
4440
id: login
4541

4642
- name: Configure deployment
47-
uses: azure/k8s-bake@61041e8c2f75c1f01186c8f05fb8b24e1fc507d8
43+
uses: azure/k8s-bake@v3
4844
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 }}
5361
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

Comments
 (0)