Skip to content

Commit d35996d

Browse files
CI workflows
1 parent 49ca923 commit d35996d

File tree

2 files changed

+55
-2
lines changed

2 files changed

+55
-2
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
qa:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
- uses: actions/setup-python@v5
1515
with:
1616
python-version: "3.9"
@@ -19,7 +19,7 @@ jobs:
1919
needs: qa
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2323
- uses: actions/setup-python@v5
2424
with:
2525
python-version: "3.9"

.github/workflows/deploy.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy
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+
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
16+
17+
permissions:
18+
id-token: write # for Azure OIDC, see https://github.com/Azure/login
19+
contents: read
20+
21+
jobs:
22+
deploy:
23+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: checkout the Helm charts to deploy our published instance
27+
uses: actions/checkout@v4
28+
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
32+
33+
- name: Login to Azure to deploy our chart
34+
uses: azure/login@v2
35+
with:
36+
creds: ${{ secrets.AZURE_CREDENTIALS }}
37+
38+
- name: Gets K8s context
39+
uses: azure/aks-set-context@v4
40+
with:
41+
creds: ${{ secrets.AZURE_CREDENTIALS }}
42+
resource-group: ${{ env.RESOURCE_GROUP }}
43+
cluster-name: ${{ env.CLUSTER_NAME }}
44+
id: login
45+
46+
- name: Configure deployment
47+
uses: azure/k8s-bake@61041e8c2f75c1f01186c8f05fb8b24e1fc507d8
48+
with:
49+
renderEngine: 'helm'
50+
helmChart: ${{ env.CHART_PATH }}
51+
overrideFiles: ${{ env.CHART_OVERRIDE_PATH }}
52+
helm-version: 'latest'
53+
id: bake

0 commit comments

Comments
 (0)