Skip to content

Commit 9ce0cde

Browse files
added tags in RAdeploy.yml file
1 parent 82fcc89 commit 9ce0cde

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/RAdeploy.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- byoc-researcher
7+
- CI-Pipeline-research
78
schedule:
89
- cron: '0 7,19 * * *' # Runs at 7:00 AM and 7:00 PM GMT
910

@@ -83,7 +84,17 @@ jobs:
8384
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
8485
if [ "$rg_exists" = "false" ]; then
8586
echo "Resource group does not exist. Creating..."
86-
az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }} || { echo "Error creating resource group"; exit 1; }
87+
88+
# Generate current timestamp in desired format: YYYY-MM-DDTHH:MM:SS.SSSSSSSZ
89+
current_date=$(date -u +"%Y-%m-%dT%H:%M:%S.%7NZ")
90+
az group create --name ${{ env.RESOURCE_GROUP_NAME }} \
91+
--location ${{ env.AZURE_LOCATION }} \
92+
--tags "CreatedBy=Pipeline" \
93+
"Purpose=Deploying and Cleaning Up Resources for Validation" \
94+
"CreatedDate=$current_date" \
95+
"ApplicationName=Research Assistant" \
96+
"SecurityControl=Ignore" \
97+
|| { echo "Error creating resource group"; exit 1; }
8798
else
8899
echo "Resource group already exists."
89100
fi

0 commit comments

Comments
 (0)