2021-04-23 03:50:33 +00:00
|
|
|
name: "Test getBible static JSON API build"
|
|
|
|
|
|
|
|
on:
|
|
|
|
# run a test when pushing to master, and when pull request is made to staging
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- staging
|
|
|
|
|
|
|
|
jobs:
|
2021-04-25 01:41:17 +00:00
|
|
|
test:
|
2021-04-23 03:50:33 +00:00
|
|
|
runs-on: [ubuntu-20.04]
|
|
|
|
steps:
|
|
|
|
- name: Clone Staging Repositry
|
|
|
|
uses: sudosubin-ppas/git-clone-action@v1.0.0
|
|
|
|
with:
|
|
|
|
repository: getbible/v2_builder
|
|
|
|
ref: staging
|
|
|
|
- name: Install Dependancies
|
|
|
|
run: |
|
|
|
|
sudo apt install python3.8 python3-pip python3-requests
|
|
|
|
sudo pip3 install future
|
|
|
|
sudo pip3 install pysword
|
2021-04-27 17:14:24 +00:00
|
|
|
- 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 ./src/setGithubUser.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"
|
2021-04-23 03:50:33 +00:00
|
|
|
- name: Build the JSON Bible files
|
2021-04-27 17:14:24 +00:00
|
|
|
env:
|
|
|
|
HASH_REPO: ${{ secrets.GETBIBLE_HASH_REPO_T }}
|
|
|
|
SCRIPTURE_REPO: ${{ secrets.GETBIBLE_SCRIPTURE_REPO_T }}
|
2021-04-23 03:50:33 +00:00
|
|
|
run: |
|
2021-04-27 17:14:24 +00:00
|
|
|
/bin/bash ./run.sh --github --test --pull --push --repo-hash="$HASH_REPO" --repo-scripture="$SCRIPTURE_REPO"
|