From dbf063124ddee41c266d17c3c664f35e07f3484e Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 3 Jan 2022 15:10:12 +0200 Subject: [PATCH] Addes full test action --- .github/workflows/full-test.yml | 36 +++++++++++++++++++++++++++++++++ run.sh | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/full-test.yml diff --git a/.github/workflows/full-test.yml b/.github/workflows/full-test.yml new file mode 100644 index 0000000..1de4b08 --- /dev/null +++ b/.github/workflows/full-test.yml @@ -0,0 +1,36 @@ +name: "Test Build getBible static JSON API files" + +on: + # so we can manually update + workflow_dispatch: + +jobs: + build: + runs-on: [ubuntu-20.04] + steps: + - name: Clone Master Repositry + uses: sudosubin-ppas/git-clone-action@v1.0.0 + with: + repository: getbible/v2_builder + ref: master + - name: Install Dependancies + run: | + sudo apt install python3.8 python3-pip python3-requests + sudo pip3 install future + sudo pip3 install pysword + - name: Setup gitHub User Details + env: + GIT_USER: ${{ secrets.GETBIBLE_GIT_USER }} + GIT_EMAIL: ${{ secrets.GETBIBLE_GIT_EMAIL }} + GPG_USER: ${{ secrets.GETBIBLE_GPG_USER }} + GPG_KEY: ${{ secrets.GETBIBLE_GPG_KEY }} + SSH_KEY: ${{ secrets.GETBIBLE_SSH_KEY }} + SSH_PUB: ${{ secrets.GETBIBLE_SSH_PUB }} + run: | + /bin/bash <(/bin/curl -s https://raw.githubusercontent.com/vdm-io/github-user/master/src/setup.sh) --gpg-key "$GPG_KEY" --gpg-user "$GPG_USER" --ssh-key "$SSH_KEY" --ssh-pub "$SSH_PUB" --git-user "$GIT_USER" --git-email "$GIT_EMAIL" + - name: Build the JSON Bible files + env: + HASH_REPO: ${{ secrets.GETBIBLE_HASH_REPO }} + SCRIPTURE_REPO: ${{ secrets.GETBIBLE_SCRIPTURE_REPO }} + run: | + /bin/bash ./run.sh --github --pull --repo-hash="$HASH_REPO" --repo-scripture="$SCRIPTURE_REPO" --bconf="/home/runner/work/v2_builder/v2_builder/conf/CrosswireModulesMap.json" \ No newline at end of file diff --git a/run.sh b/run.sh index 7027fb8..39bc494 100755 --- a/run.sh +++ b/run.sh @@ -150,7 +150,7 @@ function prepScriptureMainGit() { fi mkdir -p "${scripture_path}Tmp" mv -f "${scripture_path}/.git" "${scripture_path}Tmp" - mv -f "${scripture_path}/.gitignore" "${scripture_path}Tmp" + [ -d "${scripture_path}/.gitignore" ] && mv -f "${scripture_path}/.gitignore" "${scripture_path}Tmp" # now we remove all the old git files (so we start clean each time in the build) rm -fr "${scripture_path}"