Skip to content

Commit

Permalink
Merge pull request #526 from djarecka/pushga_update
Browse files Browse the repository at this point in the history
adding context to reproschema-py PR GA workflow
  • Loading branch information
djarecka authored Jun 20, 2024
2 parents 1d1eef8 + 4b67db8 commit e679752
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/push_reproschema_py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,25 @@ jobs:
- name: Make changes to target repository
id: changes
run: |
cp releases/${{ inputs.version }}/reproschema.jsonld reproschema-py/reproschema.jsonld
# updating pydantic model
cp releases/${{ inputs.version }}/reproschema_model.py reproschema-py/reproschema/models/model.py
cd reproschema-py
# updating url to context
echo "# this is automatically updated after reproschema new release" > reproschema/context_url.py
echo "CONTEXTFILE_URL = 'https://raw.githubusercontent.com/ReproNim/reproschema/main/releases/${{ inputs.version }}/reproschema'"
git checkout -b release_${{ inputs.version }}
# TODO: change to pydantic model
# TODO: a script to change CONTEXTFILE_URL can be added
git add reproschema.jsonld
git commit -m "Add new version of the model"
git add reproschema/models/model.py
git add reproschema/context_url.py
git commit -m "Add new version of the pydantic model and new context url"
cd ..
- name: Push changes to target repository
- name: Push changes to reproschema-py
env:
TARGET_REPO: repronim/reproschema-py
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
cd reproschema-py
git push origin release_${{ inputs.version }}
- name: Create pull request
- name: Create pull request to reproschema-py
env:
TARGET_REPO: repronim/reproschema-py
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Expand Down

0 comments on commit e679752

Please sign in to comment.