Skip to content

Commit

Permalink
update generate dump action
Browse files Browse the repository at this point in the history
  • Loading branch information
lizkrznarich committed Mar 20, 2024
1 parent 2346070 commit 989d85d
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/generate_dump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: Create data dump
on:
workflow_dispatch:
inputs:
release-schema-version:
required: true
description: Release schema version
type: choice
options:
- v1
- v2
new-release:
type: string
description: Name of the directory that the new release is located in
Expand Down Expand Up @@ -35,7 +42,7 @@ jobs:
with:
repository: ror-community/curation_ops
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
ref: dump-csv
ref: v2-crosswalk
path: ./curation_ops
- name: Set up Python environment
uses: actions/setup-python@v2
Expand All @@ -45,7 +52,12 @@ jobs:
id: gendumpscript
run: |
cd ./curation_ops/generate_dump/
python generate_dump.py -r ${{github.event.inputs.new-release}} -e ${{github.event.inputs.prev-release}} -i '../../ror-records-test' -o '../../ror-records-test'
if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then
python generate_dump.py -r ${{github.event.inputs.new-release}} -e ${{github.event.inputs.prev-release}} -i '../../ror-records-test' -o '../../ror-records-test' -v 1
fi
if [[ ${{ github.event.inputs.schema-version }} == 'v2' ]]; then
python generate_dump.py -r ${{github.event.inputs.new-release}} -e ${{github.event.inputs.prev-release}} -i '../../ror-records-test' -o '../../ror-records-test' -v 2
fi
- name: cat error file
if: ${{ steps.gendumpscript.outcome != 'success'}}
run: |
Expand Down Expand Up @@ -73,4 +85,4 @@ jobs:
with:
channel: '#ror-curation-releases'
color: 'good'
text: 'DEV Data dump ${{github.event.inputs.new-release}} generation status: ${{ steps.commitdumpfile.outcome }} Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'
text: 'DEV Data dump ${{github.event.inputs.new-release}} generation status: ${{ steps.commitdumpfile.outcome }}. Using base version ${{ github.event.inputs.schema-version }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'

0 comments on commit 989d85d

Please sign in to comment.