Fix inconsistent QC metrics (#234) #24
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: "Update OWL" | |
on: | |
push: | |
branches: [master] | |
jobs: | |
generate-owl: | |
if: "! contains(github.event.head_commit.message, 'Update OWL file')" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Extract version from OBO | |
run: | | |
CV_VERSION=`grep data-version psi-ms.obo | grep -oP "(\d+.\d+.\d+)"` | |
echo CV_VERSION=${CV_VERSION} | |
echo "CV_VERSION=${CV_VERSION}" >> $GITHUB_ENV | |
- name: Generate OWL | |
run: | | |
docker pull obolibrary/robot:v1.8.1 | |
# Replace the imports of the UO and PATO ontology .obo files with the equivalent .owl files | |
cp psi-ms.obo tmp.obo | |
sed -e "s/pato.obo/pato.owl/g" -e "s/uo.obo/uo.owl/g" -i tmp.obo | |
head -n 50 tmp.obo | |
export JAVA_TOOL_OPTIONS=-Xmx6G | |
docker run --rm -v ${{ github.workspace }}:/work obolibrary/robot:v1.8.1 robot convert -vvv -i /work/tmp.obo -o /work/psi-ms.owl --format owl | |
rm tmp.obo | |
- name: Create pull request | |
id: cpr | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.PSI_MS_CV_GITHUB_TOKEN }} | |
commit-message: Update OWL file | |
committer: GitHub <[email protected]> | |
author: GitHub <[email protected]> | |
branch: update-owl-file | |
delete-branch: true | |
title: Update OWL file | |
body: This automated PR updates the OWL file corresponding to the OBO file | |
- name: Approve pull request | |
if: (steps.cpr.outputs.pull-request-operation == 'created' || steps.cpr.outputs.pull-request-operation == 'updated') | |
uses: juliangruber/approve-pull-request-action@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
number: ${{ steps.cpr.outputs.pull-request-number }} | |
- name: Merge pull request | |
if: (steps.cpr.outputs.pull-request-operation == 'created' || steps.cpr.outputs.pull-request-operation == 'updated') | |
uses: peter-evans/enable-pull-request-automerge@v2 | |
with: | |
token: ${{ secrets.PSI_MS_CV_GITHUB_TOKEN }} | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
merge-method: squash | |
- name: GitHub Tag | |
id: new_tag | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.PSI_MS_CV_GITHUB_TOKEN }} | |
pre_release_branches: test-tag | |
custom_tag: ${{ env.CV_VERSION }} |