Skip to content

retire biolib run counter #25

retire biolib run counter

retire biolib run counter #25

name: PPRCODE_Guideline Workflow - for README refreshing
on:
push:
paths:
- 'README.md' # Monitor the 'README.md' file
- '.github/workflows/pprcode-refresh-readme.yml' # Monitor the 'README.md' ci script file
- '.biolib/config.yml' # Monitor the Biolib config file
branches:
- main
jobs:
refresh-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- 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
# 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
# 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: Refresh Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: yaoyinying
password: ${{ secrets.DOCKER_GITHUB_REPO_SECRET }}
repository: yaoyinying/pprcode
readme-filepath: ./README.md
enable-url-completion: true
- 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