19
19
description : " image name"
20
20
required : true
21
21
type : string
22
+ email :
23
+ description : " Email address to send email to"
24
+ required : true
25
+ type : string
22
26
23
27
jobs :
24
28
create-or-update-values-file :
@@ -92,16 +96,16 @@ jobs:
92
96
steps :
93
97
- name : Checkout
94
98
uses : actions/checkout@v4
95
- - id : ' auth'
96
- name : ' Authenticate to Google Cloud'
97
- uses : ' google-github-actions/auth@v2'
99
+ - id : " auth"
100
+ name : " Authenticate to Google Cloud"
101
+ uses : " google-github-actions/auth@v2"
98
102
with :
99
103
create_credentials_file : true
100
- workload_identity_provider : ' projects/1006240973223/locations/global/workloadIdentityPools/gha-create-gke-cluster/providers/github-actions'
101
- service_account :
' [email protected] '
102
- - id : ' get-credentials'
104
+ workload_identity_provider : " projects/1006240973223/locations/global/workloadIdentityPools/gha-create-gke-cluster/providers/github-actions"
105
+ service_account :
" [email protected] "
106
+ - id : " get-credentials"
103
107
name : Get GKE creds
104
- uses : ' google-github-actions/get-gke-credentials@v2'
108
+ uses : " google-github-actions/get-gke-credentials@v2"
105
109
with :
106
110
cluster_name : code-idp-gke
107
111
location : europe-west1
@@ -120,3 +124,28 @@ jobs:
120
124
git pull
121
125
helm upgrade -i ${FOLDER_NAME} ./codeIdpChart -f submissions-${YEAR}/${FOLDER_NAME}/values.yml -n submissions-${YEAR}
122
126
echo "STUDENT_URL=$(kubectl get ingress ${FOLDER_NAME}-ingress -n submissions-2024 -o jsonpath='{.spec.rules[*].host}')" >> $GITHUB_ENV
127
+
128
+ send_email_with_url :
129
+ needs : deploy-with-helm
130
+ permissions :
131
+ id-token : write
132
+ contents : read
133
+ name : " send an email address with the url"
134
+ runs-on : ubuntu-latest
135
+ defaults :
136
+ run :
137
+ shell : bash
138
+ if : ${{ needs.deploy-with-helm.outputs.students_url }}
139
+ steps :
140
+ - name : Send mail
141
+ uses : dawidd6/action-send-mail@v3
142
+ with :
143
+ server_address : mail.your-server.de
144
+ server_port : 465
145
+ secure : true
146
+
147
+ password : ${{secrets.MAIL_PASSWORD}}
148
+ subject : Application deployed successfully! ✨
149
+ to : ${{ inputs.email }}
150
+ from : The friendly code idp bot
151
+ body : " Your application has been deployed! 🎉 you can find your application deployed on the following url: ${{ needs.deploy-with-helm.outputs.students_url }}"
0 commit comments