You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This github workflow will automatically update docker image tags of onboarding-server-depl in the datakaveri/iudx-deployment repository files, whenever docker image is pushed to ghcr.io/datakaveri/onboarding-server-depl .Based on tag it will update the master/latest branch (if its 1.0.2-alpha-) or 1.0.1 stable branch (if its 1.0.1-)
2
+
name: Update Onboarding server docker image tags
3
+
4
+
# This trigger will run the workflow whenever a new package is published to the registry
5
+
on:
6
+
registry_package:
7
+
types: [published]
8
+
9
+
# This is needed to read the registry packages
10
+
permissions:
11
+
packages: read
12
+
13
+
jobs:
14
+
15
+
build:
16
+
runs-on: ubuntu-20.04
17
+
18
+
steps:
19
+
- uses: actions/checkout@v3
20
+
with:
21
+
repository: datakaveri/iudx-deployment
22
+
# Jenkins token to perform git operations
23
+
token: "${{ secrets.JENKINS_UPDATE }}"
24
+
fetch-depth: 0
25
+
26
+
# This step updates the Onboarding server docker image tags
27
+
- name: Update Onboarding server docker image tags
28
+
env:
29
+
GH_TOKEN: ${{ secrets.JENKINS_UPDATE}}
30
+
run: |
31
+
# Get the latest version of 1.0.1 and 1.0.2-alpha tags from the container registry using GitHub API
# Uses sed to find and replace $oldtag1_0_1 with $newtag1_0_1 in Docker-Swarm-deployment/single-node/onboarding-server/onboarding-server-stack.yaml file
51
+
sed -i s/$oldtag1_0_1/$newtag1_0_1/g Docker-Swarm-deployment/single-node/onboarding-server/onboarding-server-stack.yaml
52
+
53
+
# Exports the current version of the application from K8s-deployment/Charts/onboarding-server/Chart.yaml file
# Uses sed to find and replace $oldappversion with $newappversion in K8s-deployment/Charts/onboarding-server/Chart.yaml and K8s-deployment/Charts/onboarding-server/values.yaml files
60
+
sed -i s/$oldappversion/$newappversion/g K8s-deployment/Charts/onboarding-server/Chart.yaml
61
+
sed -i s/$oldtag1_0_1/$newtag1_0_1/g K8s-deployment/Charts/onboarding-server/values.yaml
# Uses sed to find and replace $oldtag1_0_2 with $newtag1_0_2 in Docker-Swarm-deployment/single-node/onboarding-server/onboarding-server-stack.yaml file
76
+
sed -i s/$oldtag1_0_2/$newtag1_0_2/g Docker-Swarm-deployment/single-node/onboarding-server/onboarding-server-stack.yaml
77
+
78
+
# Exports the current version of the application from K8s-deployment/Charts/onboarding-server/Chart.yaml file
# Uses sed to find and replace $oldappversion with $newappversion in K8s-deployment/Charts/onboarding-server/Chart.yaml and K8s-deployment/Charts/onboarding-server/values.yaml files
85
+
sed -i s/$oldappversion/$newappversion/g K8s-deployment/Charts/onboarding-server/Chart.yaml
86
+
sed -i s/$oldtag1_0_2/$newtag1_0_2/g K8s-deployment/Charts/onboarding-server/values.yaml
0 commit comments