Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding context to reproschema-py PR GA workflow #526

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading