fix pybiolib url -> path #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PPRCODE_Guideline Workflow | |
on: | |
push: | |
paths: | |
- 'docker/**' # Monitor the entire 'docker' directory | |
- 'scripts/**' # Monitor the entire 'scripts' directory | |
- '.github/workflows/pprcode-guideline.yml' # monitor the main workflow script. enable it again if in necessary maintainances. | |
- '.biolib/config.yml' # Monitor the Biolib config file | |
branches: | |
- main | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# - name: Upload coverage reports to Codecov | |
# uses: codecov/codecov-action@v3 | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Set environment variable with current date | |
run: | | |
echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
echo "DATE: ${{ env.DATE }}" | |
- name: Set environment variable with current repo dir | |
run: | | |
echo "REPO=$PWD" >> $GITHUB_ENV | |
echo "REPO: ${{ env.REPO }}" | |
- name: Build Docker image | |
run: docker build -f docker/Dockerfile -t pprcode . | |
- name: Tag Docker image with date and latest | |
run: | | |
docker tag pprcode yaoyinying/pprcode:${{ env.DATE }} | |
docker tag pprcode yaoyinying/pprcode:latest | |
- name: Log in to Docker Hub | |
run: echo "${{ secrets.DOCKER_GITHUB_REPO_SECRET }}" | docker login -u yaoyinying --password-stdin | |
- name: Create Testing and Run it | |
run: | | |
python -m venv pprcode_test | |
source pprcode_test/bin/activate | |
pip install -r docker/requirements.txt | |
python ${{ env.REPO }}/docker/run_docker.py --fasta ${{ env.REPO }}/ppr_example.fasta --save_dir ./save-psscan --plot_item=bar,score,edge,ppr,rna --debug | |
python ${{ env.REPO }}/docker/run_docker.py --fasta ${{ env.REPO }}/ppr_example.fasta --save_dir ./save-pprfinder --plot_item=bar,score,edge,ppr,rna --program=pprfinder --debug | |
deactivate | |
- name: Push Docker image | |
run: | | |
cd ${{ env.REPO }} | |
docker push yaoyinying/pprcode:${{ env.DATE }} | |
docker push yaoyinying/pprcode:latest | |
- name: Update Readme file for CI actions | |
run: | | |
awk '{if ($0 !~ "https://img.shields.io" && $0 !~ "https://tinyurl.com/pprcode-badge" && $0 !~ "badge.svg" ){print }}' README.md >README.ci.md | |
cat README.ci.md | |
- name: Install pybiolib package | |
run: pip3 install -U pybiolib | |
- name: Build and push biolib application | |
run: BIOLIB_TOKEN=${{ secrets.BIOLIB_TOKEN }} biolib push YaoYinYing/pprcode | |
- name: Delete temp Readme | |
run: rm -f README.ci.md |