Skip to content

Create uniprot.yml

Create uniprot.yml #1

Workflow file for this run

name: Check and test UniProt updates
on:
workflow_dispatch:
pull_request: # tests whether it is working on PR
paths:
- '.github/workflows/uniprot.yml'
schedule:
- cron: "0 0 1,15 * *" # Run the workflow on the 1st and 15th day of each month
permissions:
contents: write
pages: write
id-token: write
issues: write
jobs:
check_new_data:
runs-on: ubuntu-latest
name: Check the date of the latest data
outputs:
UNIPROT_SPROT_NEW: ${{ steps.check_download.outputs.UNIPROT_SPROT_NEW }}
SEC_AC_NEW: ${{ steps.check_download.outputs.SEC_AC_NEW }}
DELAC_SP_NEW: ${{ steps.check_download.outputs.DELAC_SP_NEW }}
DATE_NEW: ${{ steps.check_download.outputs.DATE_NEW }}
DATE_OLD: ${{ steps.check_download.outputs.DATE_OLD }}
steps:
# step 1: check the release date for the latest UniProt files
- name: Checkout
uses: actions/checkout@v4
- name: Check for new uniprot files
id: check_download
run: |
##Extract the date from the uniprot config file
date_old=$(grep -E '^date=' datasources/uniprot/config | cut -d'=' -f2)
echo 'Accessing the uniprot data'
wget https://ftp.ebi.ac.uk/pub/databases/uniprot/current_release/knowledgebase/complete/ -O uniprot_index.html
less uniprot_index.html