-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #210 from ror-community/dev
v1.43
- Loading branch information
Showing
2,530 changed files
with
261,367 additions
and
163 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
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 |
---|---|---|
|
@@ -2,6 +2,13 @@ name: DEV manual deploy from dev branch | |
on: | ||
workflow_dispatch: | ||
inputs: | ||
schema-version: | ||
required: true | ||
description: Schema version | ||
type: choice | ||
options: | ||
- v1 | ||
- v2 | ||
directory-name: | ||
type: string | ||
required: true | ||
|
@@ -15,7 +22,7 @@ env: | |
jobs: | ||
check_permission: | ||
runs-on: ubuntu-latest | ||
if: github.event.ref == 'refs/heads/dev' | ||
#if: github.event.ref == 'refs/heads/dev' | ||
steps: | ||
- name: Get Permission | ||
uses: octokit/[email protected] | ||
|
@@ -34,7 +41,7 @@ jobs: | |
fi | ||
check_validation: | ||
runs-on: ubuntu-latest | ||
if: github.event.ref == 'refs/heads/dev' | ||
#if: github.event.ref == 'refs/heads/dev' | ||
needs: check_permission | ||
steps: | ||
- name: checkout | ||
|
@@ -49,6 +56,7 @@ jobs: | |
uses: actions/checkout@v2 | ||
with: | ||
repository: ror-community/validation-suite | ||
ref: schema-v2 | ||
path: validation-suite | ||
- name: Validate files | ||
id: validatefiles | ||
|
@@ -58,11 +66,22 @@ jobs: | |
cd validation-suite | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
if [[ -f "../${{ github.event.inputs.directory-name }}/relationships.csv" ]]; then | ||
python run_validations.py -i ../files -f ../${{ github.event.inputs.directory-name }}/relationships.csv -p ../files/ --no-geonames | ||
else | ||
python run_validations.py -i ../files --no-geonames | ||
fi | ||
if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then | ||
curl https://raw.githubusercontent.com/ror-community/ror-schema/schema-v2/ror_schema.json -o ror_schema.json | ||
if [[ -f "../${{github.event.pull_request.head.ref}}/relationships.csv" ]]; then | ||
python run_validations.py -i ../files -v 1 -s ror_schema.json -f ../${{github.event.pull_request.head.ref}}/relationships.csv -p ../files/ --no-geonames | ||
else | ||
python run_validations.py -i ../files -v 1 -s ror_schema.json --no-geonames | ||
fi | ||
fi | ||
if [[ ${{ github.event.inputs.schema-version }} == 'v2' ]]; then | ||
curl https://raw.githubusercontent.com/ror-community/ror-schema/schema-v2/ror_schema_v2_0.json -o ror_schema_v2_0.json | ||
if [[ -f "../${{github.event.pull_request.head.ref}}/relationships.csv" ]]; then | ||
python run_validations.py -i ../files -v 2 -s ror_schema_v2_0.json -f ../${{github.event.pull_request.head.ref}}/relationships.csv -p ../files/ --no-geonames | ||
else | ||
python run_validations.py -i ../files -v 2 -s ror_schema_v2_0.json --no-geonames | ||
fi | ||
fi | ||
- name: Notify Slack | ||
if: always() | ||
uses: edge/simple-slack-notify@master | ||
|
@@ -74,7 +93,7 @@ jobs: | |
text: 'Validation status during DEV manual index: ${{ steps.validatefiles.outcome }}. In directory: ${{ github.event.inputs.directory-name }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}' | ||
copy-files: | ||
runs-on: ubuntu-latest | ||
if: github.event.ref == 'refs/heads/dev' | ||
#if: github.event.ref == 'refs/heads/dev' | ||
needs: check_validation | ||
steps: | ||
- name: checkout | ||
|
@@ -89,8 +108,8 @@ jobs: | |
run: | | ||
cd ./${{ github.event.inputs.directory-name }} | ||
zip files.zip *.json | ||
aws s3 cp files.zip s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV }}/${{ github.event.inputs.directory-name }}/files.zip | ||
aws s3 ls s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV }}/${{ github.event.inputs.directory-name }}/files.zip | ||
aws s3 cp files.zip s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV }}/${{ github.event.inputs.directory-name }}-${{ github.event.inputs.schema-version }}/files.zip | ||
aws s3 ls s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV }}/${{ github.event.inputs.directory-name }}-${{ github.event.inputs.schema-version }}/files.zip | ||
- name: Notify Slack | ||
if: always() | ||
uses: edge/simple-slack-notify@master | ||
|
@@ -106,7 +125,13 @@ jobs: | |
cd .github/workflows | ||
python -m pip install --upgrade pip | ||
pip install requests==2.23.0 | ||
python index_files.py -u ${{ secrets.INDEX_DEV_API_URL }} -d ${{ github.event.inputs.directory-name }} -he ${{ secrets.INDEX_DEV_API_HEADERS }} | ||
if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then | ||
python index_files.py -u ${{ secrets.INDEX_DEV_API_URL_V1 }} -d ${{ github.event.inputs.directory-name }}-v1 -he ${{ secrets.INDEX_DEV_API_HEADERS }} | ||
fi | ||
if [[ ${{ github.event.inputs.schema-version }} == 'v2' ]]; then | ||
python index_files.py -u ${{ secrets.INDEX_DEV_API_URL_V2 }} -d ${{ github.event.inputs.directory-name }}-v2 -he ${{ secrets.INDEX_DEV_API_HEADERS }} | ||
fi | ||
- name: Notify Slack | ||
if: always() | ||
uses: edge/simple-slack-notify@master | ||
|
@@ -115,5 +140,5 @@ jobs: | |
with: | ||
channel: '#ror-curation-releases' | ||
color: 'good' | ||
text: 'DEV index status: ${{ steps.indexdata.outcome }}. From directory: ${{ github.event.inputs.directory-name }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}' | ||
text: 'DEV index status: ${{ steps.indexdata.outcome }}. Using version ${{ github.event.inputs.schema-version }}. From directory: ${{ github.event.inputs.directory-name }}-${{ github.event.inputs.schema-version }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}' | ||
|
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
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
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
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
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
Oops, something went wrong.