Skip to content

Commit 3bfeb62

Browse files
authored
Updating text for work week demo (#25)
2 parents 554b774 + 39586dc commit 3bfeb62

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

go-demo/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func main() {
4343
})
4444

4545
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
46-
w.Write([]byte("Welcome to the cicd demo go web app! Visit /__version__ for version information. Use the preview label to provision an ephemeral environment for testing!"))
46+
w.Write([]byte("Welcome to the cicd demo go web app! Visit /__version__ for version information. Use the preview label to provision an ephemeral environment for testing!, Work Week Demo!"))
4747
})
4848

4949
port := "8000"

go-demo/release.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ set -e
1212
DATE_EPOCH=$(date +%s)
1313
GITHUB_REPOSITORY_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
1414
GITHUB_ACTION_RUN_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
15+
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
16+
GITHUB_SHA=$(cat $GITHUB_EVENT_PATH | jq -r .pull_request.head.sha)
17+
GITHUB_REF_NAME=$(cat $GITHUB_EVENT_PATH | jq -r .pull_request.head.sha)
18+
fi
1519

1620
# Generate version.json
1721
cat <<EOF > version.json
@@ -22,4 +26,4 @@ cat <<EOF > version.json
2226
"build": "$GITHUB_ACTION_RUN_URL",
2327
"date": "$DATE_EPOCH"
2428
}
25-
EOF
29+
EOF

0 commit comments

Comments
 (0)