-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCode.gs
More file actions
23 lines (17 loc) · 758 Bytes
/
Code.gs
File metadata and controls
23 lines (17 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function doPost(request){
// get the sting value of the POST data
var postJSON = request.postData.getDataAsString();
var payload = JSON.parse(postJSON);
var tag = payload.push_data.tag;
var reponame = payload.repository.repo_name;
var dockerimagename = payload.repository.name;
if(typeof request !== 'undefined')
MailApp.sendEmail({
to: "yourmailid@gmail.com",
subject: "New Docker Image Uploaded to the repository "+reponame,
htmlBody: "Hi Team,<br>"+
"Please find the Details of the Docker Image uploaded to the repository "+reponame+"<br>"+
"<strong>Docker Name: " + dockerimagename+"<br>"+
"Docker Image version:" +tag+"<br></strong>"
});
}