Fix script to skip builds iff md files are changed

In previous commits, we ignored the fact that bools are strings in bash
This caused the workflow to proceed wrongly and this commit fixes that
Also, auto builds for actions docs were added
next
Sayan Nandan 4 years ago
parent 336115e493
commit 2a9fa9ffcf

@ -2,8 +2,8 @@ name: Test (push)
on: [push]
env:
IS_ACTIONS_DOC: false
IS_MD_FILE: false
IS_ACTIONS_DOC: "false"
IS_MD_FILE: "false"
jobs:
test:
name: Test
@ -41,7 +41,7 @@ jobs:
restore-keys: |
${{ matrix.build }}-cargo-registry-
# HACK(@ohsayan): The next line skips caching until it is fixed
if: runner.os != 'macOS'
if: runner.os != 'macOS' && env.IS_MD_FILE == 'false'
- name: Cache Cargo index
uses: actions/cache@v1
@ -51,7 +51,7 @@ jobs:
restore-keys: |
${{ matrix.build }}-cargo-index-
# HACK(@ohsayan): The next line skips caching until it is fixed
if: runner.os != 'macOS'
if: runner.os != 'macOS' && env.IS_MD_FILE == 'false'
- name: Cache Cargo build
uses: actions/cache@v1
@ -61,14 +61,27 @@ jobs:
restore-keys: |
${{ matrix.build }}-target-
# HACK(@ohsayan): The next line skips caching until it is fixed
if: runner.os != 'macOS'
if: runner.os != 'macOS' && env.IS_MD_FILE == 'false'
- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
if: env.IS_MD_FILE == 'false'
- name: Publish docs
env:
BOT_USER: ${{ secrets.BOT_INIT_USER }}
BOT_MAIL: ${{ secrets.BOT_INIT_MAIL }}
BOT_API: ${{ secrets.BOT_API_CALL }}
GIT_SHA: ${{ env.GITHUB_SHA }}
run: |
chmod +x ci/doc.sh
ci/doc.sh
if: runner.os == 'Linux' && env.IS_ACTIONS_DOC == 'true'
- name: Run Tests
run: cargo test --verbose -- --test-threads=1
env:
RUST_BACKTRACE: 1
if: env.IS_MD_FILE == 'false'

@ -54,7 +54,7 @@
"complexity": "O(n)",
"args": "MSET <key1> <value1> <key2> <value2> ...",
"desc": "Set the value of 'n' keys",
"return": "Number of keys that were set as an integer"
"return": "Number of keys that were set as an unsigned int"
},
{
"name": "UPDATE",
@ -70,15 +70,15 @@
"complexity": "O(n)",
"args": "UPDATE <key1> <value1> <key2> <value2> ...",
"desc": "Update the value of 'n' keys",
"return": "Number of keys that were updated as an integer"
"return": "Number of keys that were updated as an unsigned int"
},
{
"name": "DEL",
"since": "0.4.0",
"since": "0.1.0",
"complexity": "O(n)",
"args": "DEL <key1> <key2> ...",
"desc": "Delete 'n' keys",
"return": "Number of keys that were deleted as an integer"
"return": "Number of keys that were deleted as an unsigned int"
},
{
"name": "EXISTS",
@ -86,7 +86,7 @@
"complexity": "O(n)",
"args": "EXISTS <key1> <key2> ...",
"desc": "Check if 'n' keys exist",
"return": "Number of keys that exist as an integer"
"return": "Number of keys that exist as an unsigned int"
},
{
"name": "SSET",
@ -134,7 +134,7 @@
"complexity": "O(n)",
"args": "USET <key1> <value1> <key2> <value2> ...",
"desc": "SET all keys if they don't exist, or UPDATE them if they do exist",
"return": "Number of keys that were `USET`ed, as an integer"
"return": "Number of keys that were `USET`ed, as an unsigned int"
},
{
"name": "KEYLEN",
@ -142,6 +142,6 @@
"complexity": "O(1)",
"args": "KEYLEN <key>",
"desc": "Returns the length of the UTF-8 string",
"return": "Length of the key as an integer",
"return": "Length of the key as an unsigned int",
}
]
]

@ -0,0 +1,13 @@
{
git config --global user.email "$BOT_MAIL"
git config --global user.name "$BOT_USER"
C_USER=$(git show -s --format='%an' HEAD)
C_MAIL=$(git show -s --format='%ae' HEAD)
cd ..
git clone https://github.com/terrabasedb/docs.git
cd docs
chmod +x builddoc.sh
sh ./builddoc.sh
git add . && git commit -m "Updated docs from upstream" -m "Triggered by ${GITHUB_SHA}" --author "$C_USER <$C_MAIL>"
eval '${BOT_API}'
} >>/dev/null
Loading…
Cancel
Save