File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
modules/platform/ec2_deployment/template_files Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 3
3
LOG_FILE=" $HOME /hook.log"
4
4
TIMESTAMP=$( date +" %Y-%m-%d %H:%M:%S" )
5
5
6
+ INSTANCE_ID=$( wget -q -O - http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r ' .instanceId' )
7
+ aws ec2 create-tags --cli-input-json " $( jq -n \
8
+ --arg completed_timestamp " $TIMESTAMP " \
9
+ ' {
10
+ Resources: [$instance],
11
+ Tags: [
12
+ {Key:"ghr:completed_timestamp", Value:$completed_timestamp}
13
+ ]
14
+ }' ) "
15
+
6
16
{
7
17
echo " {"
8
18
echo " \" timestamp\" : \" $TIMESTAMP \" ,"
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ aws ec2 create-tags --cli-input-json "$(jq -n \
16
16
--arg run_number " $GITHUB_RUN_NUMBER " \
17
17
--arg workflow_url " ${GITHUB_SERVER_URL} /${GITHUB_REPOSITORY} /actions/runs/${GITHUB_RUN_ID} /attempts/${GITHUB_RUN_ATTEMPT} " \
18
18
--arg actor " $GITHUB_ACTOR " \
19
+ --arg started_timestamp " $TIMESTAMP " \
19
20
' {
20
21
Resources: [$instance],
21
22
Tags: [
@@ -28,7 +29,8 @@ aws ec2 create-tags --cli-input-json "$(jq -n \
28
29
{Key:"ghr:run_attempt", Value:$run_attempt},
29
30
{Key:"ghr:run_number", Value:$run_number},
30
31
{Key:"ghr:workflow_url", Value:$workflow_url},
31
- {Key:"ghr:actor", Value:$actor}
32
+ {Key:"ghr:actor", Value:$actor},
33
+ {Key:"ghr:started_timestamp", Value:$started_timestamp}
32
34
]
33
35
}' ) "
34
36
You can’t perform that action at this time.
0 commit comments