nwsde / nwsde-azuretre

An accelerator to help organizations build Trusted Research Environments on Azure.
https://microsoft.github.io/AzureTRE
MIT License
0 stars 0 forks source link

UI customisation: Show Git repo, ref, hash & deploy time in status panel #5

Open jonnyry opened 7 months ago

jonnyry commented 7 months ago

image

Execution contexts:

1. Core repo via GitHub Actions

??? potentially just use git commands as in option 2 ???

Use GitHub Action built in variables

GITHUB_SHA
GITHUB_REF_NAME
GITHUB_SHA 

2. Core repo via local Make

Call git within build process:

GIT_REPO="$(git config --get remote.origin.url | sed 's/.*\/\([^ ]*\/[^.]*\).*/\1/')"
GIT_REF="$(git branch --show-current)"
GIT_HASH="$(git rev-parse --short HEAD)"
DEPLOY_TIME="$(printf '%(%d-%b-%Y %H:%M)T')"

3. Deployment repo via GitHub Actions

4. Deployment repo via local Make