Skip to content

Commit bb7487e

Browse files
committed
Improve propagation of secrets to mongo helper in beta action.
1 parent a91ba97 commit bb7487e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/beta.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@ jobs:
3636
MONGO_URL: ${{ secrets.MONGO_URL }}
3737
MONGO_USERNAME: ${{ secrets.MONGO_USERNAME }}
3838
MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
39-
run: bin/release-binary.sh master ${{ steps.var.outputs.sha_short }} "$MONGO_URL" "$MONGO_USERNAME" "$MONGO_PASSWORD"
39+
SHORT_HASH: ${{ steps.var.outputs.sha_short }}
40+
run: bin/release-binary.sh "master" "$SHORT_HASH" "$MONGO_URL" "$MONGO_USERNAME" "$MONGO_PASSWORD"

bin/release-binary.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ if [[ -z "$MONGO_USERNAME" || -z "$MONGO_PASSWORD" ]]; then
1212
return 0
1313
fi
1414

15+
echo "Mongo URL: $MONGO_URL"
16+
1517
if [[ "$BRANCH" == 'master' ]]; then
1618
FIELD="betaCliVersion"
1719
else
@@ -20,4 +22,4 @@ fi
2022

2123
echo "Release: $FIELD $VERSION"
2224

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

0 commit comments

Comments
 (0)