-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into issue-#598-part2
- Loading branch information
Showing
5 changed files
with
248 additions
and
29 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Create new pull request | ||
|
||
on: | ||
workflow_dispatch: | ||
issues: | ||
types: [ opened, edited ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
container: obolibrary/odkfull:v1.4.3 | ||
strategy: | ||
matrix: | ||
python-version: ["3.9"] | ||
os: [ ubuntu-latest ] | ||
|
||
steps: | ||
- name: Checkout main branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Return issue number | ||
id: gh-script-issue | ||
uses: actions/github-script@v6 | ||
with: | ||
# github-token: ${{ secrets.GH_TOKEN }} | ||
script: | | ||
const issue_number = context.issue.number | ||
const repo = context.repo.owner+"/"+context.repo.repo | ||
return issue_number | ||
- name: Return repository name | ||
id: gh-script-repo | ||
uses: actions/github-script@v6 | ||
with: | ||
# github-token: ${{ secrets.GH_TOKEN }} | ||
script: | | ||
const repo = context.repo.owner+"/"+context.repo.repo | ||
return repo | ||
- name: Set branch name | ||
id: vars | ||
run: | | ||
echo "resource=src/ontology/ro-edit.owl" >> $GITHUB_ENV | ||
echo "branch-name=kgcl_automation_"${{ steps.gh-script-issue.outputs.result }} >> $GITHUB_ENV | ||
- name: Get jar & enable plugin. | ||
run: | | ||
mkdir -p robot-plugins | ||
wget https://github.com/gouttegd/kgcl-java/releases/download/kgcl-0.2.0/kgcl-robot-plugin-0.2.0.jar -O robot-plugins/kgcl.jar | ||
echo "ROBOT_PLUGINS_DIRECTORY=$(pwd)/robot-plugins/" >> "$GITHUB_ENV" | ||
- name: Install dependencies | ||
run: | | ||
pip install ontobot-change-agent | ||
- name: Run ochange | ||
id: ochange | ||
run: | | ||
ochange process-issue ${{ env.resource }} \ | ||
-r ${{ steps.gh-script-repo.outputs.result }} \ | ||
-n ${{ steps.gh-script-issue.outputs.result }} \ | ||
-g ${{ secrets.GH_TOKEN }} | ||
- name: Clean-up | ||
run: rm -rf robot-plugins | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
if: ${{ env.PR_TITLE}} | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
branch-suffix: short-commit-hash | ||
labels: Automated | ||
author: ${{ env.ISSUE_CREATOR }} <${{ env.ISSUE_CREATOR }}@users.noreply.github.com> | ||
committer: ${{ env.ISSUE_CREATOR }} <${{ env.ISSUE_CREATOR }}@users.noreply.github.com> | ||
body: ${{ env.PR_BODY }} | ||
title: ${{ env.PR_TITLE }} | ||
base: ${{ github.head_ref }} | ||
branch: ${{ env.branch-name }} |
Oops, something went wrong.