Skip to content

Commit 6d70921

Browse files
committed
Further improve propagation of secrets to mongo helper in beta action.
1 parent bb7487e commit 6d70921

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/beta.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
jobs:
88
pre-release:
99
name: "Beta Release"
10+
environment: production
1011
runs-on: "ubuntu-latest"
1112
services:
1213
mongodb:

bin/release-binary.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/usr/bin/env bash
22

33
BRANCH="$1"
4-
BUILD_NUMBER="$2"
4+
SHORT_HASH="$2"
55
MONGO_URL="$3"
66
MONGO_USERNAME="$4"
77
MONGO_PASSWORD="$5"
8-
VERSION="$BRANCH+$BUILD_NUMBER"
8+
VERSION="$BRANCH+$SHORT_HASH"
99

1010
if [[ -z "$MONGO_USERNAME" || -z "$MONGO_PASSWORD" ]]; then
1111
echo "No mongo credentials so doing nothing..."
12-
return 0
12+
return 1
1313
fi
1414

1515
echo "Mongo URL: $MONGO_URL"
@@ -20,6 +20,6 @@ else
2020
FIELD="stableCliVersion"
2121
fi
2222

23-
echo "Release: $FIELD $VERSION"
23+
echo "Release: $FIELD as $VERSION"
2424

2525
mongo "${MONGO_URL}" --username="${MONGO_USERNAME}" --password="${MONGO_PASSWORD}" -eval "db.application.updateOne({}, {\$set: { \"$FIELD\": \"$VERSION\"}});"

0 commit comments

Comments
 (0)