Skip to content

test Couchbase Credential #22

test Couchbase Credential

test Couchbase Credential #22

name: test Couchbase Credential
on:
schedule:
- cron: '0 0 * * 1'
jobs:
test_credential:
runs-on: ubuntu-latest
name: Test that given env variable works
steps:
- run: wget https://github.com/couchbaselabs/couchbase-shell/releases/download/v0.75.1/cbsh-x86_64-unknown-linux-gnu.tar.gz
- run: tar -xvzf cbsh-x86_64-unknown-linux-gnu.tar.gz
- run: |
CONFIG=$(cat << EOF
version = 1
[[cluster]]
identifier = "local"
connstr = "$COUCHBASE_CONNECTION_STRING"
username = "$COUCHBASE_USERNAME"
password = "$COUCHBASE_PASSWORD"
EOF
)
echo "CONFIG<<EOF" >> $GITHUB_ENV
echo "$CONFIG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- run: echo "$CONFIG" >> config
- run: ./cbsh --config-dir . -c cb-env
shell: bash
env:
COUCHBASE_CONNECTION_STRING: ${{ secrets.COUCHBASE_CONNECTION_STRING }}
COUCHBASE_USERNAME: ${{ secrets.COUCHBASE_USERNAME }}
COUCHBASE_PASSWORD: ${{ secrets.COUCHBASE_PASSWORD }}