Skip to content

Commit

Permalink
Merge pull request #1771 from obophenotype/Manual-Trigger-Diff
Browse files Browse the repository at this point in the history
Make gogoeditdiff manual trigger
  • Loading branch information
shawntanzk authored Jan 4, 2023
2 parents b973bdb + dd855d0 commit 482fdc2
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/diff.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: 'Create ROBOT diffs on Pull requests'

on:
# Triggers the workflow on pull request events for the master branch
pull_request:
branches: [ master ]
on:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
issue_comment:
types: [created]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
edit_file:
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-latest
container: obolibrary/odklite:v1.3.0
steps:
Expand All @@ -20,8 +18,13 @@ jobs:
trigger: '#gogoeditdiff'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- uses: xt0rted/pull-request-comment-branch@v1
id: comment-branch
- uses: actions/checkout@v3
if: steps.check.outputs.triggered == 'true'
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
path: branch
# Checks-out main branch under "main" directory
- uses: actions/checkout@v3
if: steps.check.outputs.triggered == 'true'
Expand All @@ -30,14 +33,15 @@ jobs:
path: master
- name: Diff classification
if: steps.check.outputs.triggered == 'true'
run: export ROBOT_JAVA_ARGS=-Xmx6G; robot diff --labels True --left master/src/ontology/cl-edit.owl --left-catalog master/src/ontology/catalog-v001.xml --right src/ontology/cl-edit.owl --right-catalog src/ontology/catalog-v001.xml -f markdown -o edit-diff.md
run: export ROBOT_JAVA_ARGS=-Xmx6G; robot diff --labels True --left master/src/ontology/cl-edit.owl --left-catalog master/src/ontology/catalog-v001.xml --right branch/src/ontology/cl-edit.owl --right-catalog branch/src/ontology/catalog-v001.xml -f markdown -o edit-diff.md
- name: Upload diff
if: steps.check.outputs.triggered == 'true'
uses: actions/upload-artifact@v2
with:
name: edit-diff.md
path: edit-diff.md
classify_branch:
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-latest
container: obolibrary/odklite:v1.3.0
steps:
Expand All @@ -47,8 +51,12 @@ jobs:
trigger: '#gogoeditdiff'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- uses: xt0rted/pull-request-comment-branch@v1
id: comment-branch
- uses: actions/checkout@v3
if: steps.check.outputs.triggered == 'true'
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
- name: Classify ontology
if: steps.check.outputs.triggered == 'true'
run: cd src/ontology; make IMP=FALSE PAT=FALSE MIR=FALSE cl-simple.owl
Expand All @@ -60,6 +68,7 @@ jobs:
path: src/ontology/cl-simple.owl
retention-days: 1
classify_main:
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-latest
container: obolibrary/odklite:v1.3.0
steps:
Expand Down

0 comments on commit 482fdc2

Please sign in to comment.