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

Change actions branch #167

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
79dbcd6
Merge pull request #93 from ror-community/staging
adambuttrick Jun 22, 2023
0f381c9
Merge pull request #95 from ror-community/staging
adambuttrick Jul 6, 2023
d8e1f4e
Merge pull request #97 from ror-community/staging
adambuttrick Jul 27, 2023
0d02ff2
Merge pull request #100 from ror-community/staging
adambuttrick Aug 17, 2023
2ff6da4
Merge pull request #103 from ror-community/staging
adambuttrick Aug 30, 2023
90560f5
Merge pull request #105 from ror-community/staging
adambuttrick Sep 14, 2023
eb88dd7
Merge pull request #109 from ror-community/staging
adambuttrick Sep 21, 2023
8a7a130
Merge pull request #112 from ror-community/staging
adambuttrick Oct 12, 2023
7b9e9bf
Merge pull request #114 from ror-community/staging
adambuttrick Oct 26, 2023
9ed5dd8
Merge pull request #117 from ror-community/staging
adambuttrick Nov 8, 2023
45e2c18
Merge pull request #120 from ror-community/staging
adambuttrick Nov 21, 2023
0cb0420
Merge pull request #123 from ror-community/staging
adambuttrick Dec 6, 2023
e29801e
Merge pull request #126 from ror-community/staging
adambuttrick Dec 20, 2023
5536bb0
Merge pull request #130 from ror-community/staging
adambuttrick Jan 10, 2024
e29e851
Merge pull request #135 from ror-community/staging
adambuttrick Feb 12, 2024
43f3b91
Merge pull request #138 from ror-community/staging
adambuttrick Feb 21, 2024
d80d038
Merge pull request #142 from ror-community/staging
adambuttrick Mar 13, 2024
4569cd4
Merge pull request #144 from ror-community/staging
lizkrznarich Mar 26, 2024
7cd8fc4
Merge pull request #146 from ror-community/staging
adambuttrick Mar 28, 2024
3bc3bb7
Merge pull request #150 from ror-community/staging
adambuttrick Apr 11, 2024
cc0a58a
add generated v1 files
ror-bot Apr 11, 2024
9317c6f
Merge pull request #152 from ror-community/staging
adambuttrick May 2, 2024
68818fd
Merge pull request #155 from ror-community/staging
adambuttrick May 30, 2024
1713aba
update publish dump action
lizkrznarich May 30, 2024
5260d94
add generated v1 files
ror-bot May 30, 2024
3c34118
Merge pull request #157 from ror-community/staging
adambuttrick Jun 20, 2024
f93d38c
Merge pull request #160 from ror-community/staging
adambuttrick Jul 11, 2024
ba8483e
add generated v1 files
ror-bot Jul 11, 2024
fecc9f7
Merge pull request #162 from ror-community/staging
adambuttrick Jul 29, 2024
70e57a9
add generated v1 files
ror-bot Jul 29, 2024
7a92281
Merge pull request #164 from ror-community/staging
adambuttrick Aug 21, 2024
ef7336b
add generated v1 files
ror-bot Aug 21, 2024
2bd46d5
Merge pull request #166 from ror-community/staging
adambuttrick Sep 16, 2024
15f6f89
add generated v1 files
ror-bot Sep 16, 2024
8bba9e0
change curation_ops and validate-suite branch in actions to main
lizkrznarich Sep 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .github/workflows/generate_dump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
with:
repository: ror-community/curation_ops
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
ref: v2-crosswalk
path: ./curation_ops
- name: Set up Python environment
uses: actions/setup-python@v2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/staging_manual_index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ jobs:
uses: actions/checkout@v2
with:
repository: ror-community/validation-suite
ref: schema-v2
path: validation-suite
- name: Validate files
id: validatefiles
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/staging_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
uses: actions/checkout@v2
with:
repository: ror-community/validation-suite
ref: schema-v2
path: validation-suite
- name: Validate files
id: validatefiles
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/v2_temp/dev_index_dump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: DEV index full data dump
on:
workflow_dispatch:
inputs:
release-dump:
type: string
description: Name of existing release dump file to index, without .zip extension (ex v1.41-2024-02-13-ror-data)
schema-version:
required: true
description: Schema version to index
type: choice
options:
- v1
- v2
data-env:
required: true
description: ROR data env (test uses ror-data-test repo, prod uses ror-data)
default: 'test'
type: choice
options:
- test
- prod


env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}

jobs:
check_permission:
runs-on: ubuntu-latest
if: github.event.ref == 'refs/heads/dev'
steps:
- name: Get Permission
uses: octokit/[email protected]
id: get_permission
with:
route: GET /repos/${{ github.repository }}/collaborators/${{ github.actor }}/permission
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: output
run: |
export role_name=${{ fromJson(steps.get_permission.outputs.data).role_name }}
if [[ "$role_name" == "admin" ]]; then
exit 0
else
exit 1
fi
index-dump:
runs-on: ubuntu-latest
if: github.event.ref == 'refs/heads/dev'
needs: check_permission
steps:
- name: checkout
uses: actions/checkout@v2
- name: Index dump file
id: indexdatadump
run: |
cd .github/workflows
python -m pip install --upgrade pip
pip install requests==2.23.0
if [[ ${{ github.event.inputs.schema-version }} == "v1" ]]; then
python index_dump.py -u ${{ secrets.INDEX_DUMP_DEV_API_URL }} -f ${{ github.event.inputs.release-dump }} -e ${{ github.event.inputs.data-env }} -he ${{ secrets.INDEX_DEV_API_HEADERS }}
else
python index_dump.py -u ${{ secrets.INDEX_DUMP_DEV_API_URL_V2 }} -f ${{ github.event.inputs.release-dump }} -e ${{ github.event.inputs.data-env }} -he ${{ secrets.INDEX_DEV_API_HEADERS }}
fi
- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
env:
SLACK_WEBHOOK_URL: ${{ secrets.CURATOR_SLACK_WEBHOOK_URL }}
with:
channel: '#ror-curation-releases'
color: 'good'
text: 'DEV full index from dump status: ${{ steps.indexdatadump.outcome }}. From file: ${{ github.event.inputs.release-dump }}. Schema version: ${{ github.event.inputs.schema-version }}. Data env: ${{ github.event.inputs.data-env }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'

144 changes: 144 additions & 0 deletions .github/workflows/v2_temp/dev_manual_index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
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
description: Name of the directory you would like to deploy to DEV

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}

jobs:
check_permission:
runs-on: ubuntu-latest
#if: github.event.ref == 'refs/heads/dev'
steps:
- name: Get Permission
uses: octokit/[email protected]
id: get_permission
with:
route: GET /repos/${{ github.repository }}/collaborators/${{ github.actor }}/permission
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: output
run: |
export role_name=${{ fromJson(steps.get_permission.outputs.data).role_name }}
if [[ "$role_name" == "maintain" || "$role_name" == "admin" ]]; then
exit 0
else
exit 1
fi
check_validation:
runs-on: ubuntu-latest
#if: github.event.ref == 'refs/heads/dev'
needs: check_permission
steps:
- name: checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.ref }}
- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Checkout validation suite
uses: actions/checkout@v2
with:
repository: ror-community/validation-suite
ref: schema-v2
path: validation-suite
- name: Validate files
id: validatefiles
run: |
mkdir files
cp ./${{ github.event.inputs.directory-name }}/*.json files/
cd validation-suite
python -m pip install --upgrade pip
pip install -r requirements.txt
if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then
curl https://raw.githubusercontent.com/ror-community/ror-schema/master/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/master/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
env:
SLACK_WEBHOOK_URL: ${{ secrets.CURATOR_SLACK_WEBHOOK_URL }}
with:
channel: '#ror-curation-releases'
color: 'good'
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'
needs: check_validation
steps:
- name: checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.ref }}
- name: Install aws cli
id: install-aws-cli
uses: unfor19/[email protected]
- name: Zip and copy files
id: copyfiles
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 }}-${{ 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
env:
SLACK_WEBHOOK_URL: ${{ secrets.CURATOR_SLACK_WEBHOOK_URL }}
with:
channel: '#ror-curation-releases'
color: 'good'
text: 'Copy status to DEV S3 Bucket: ${{ steps.copyfiles.outcome }}. From directory: ${{ github.event.inputs.directory-name }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'
- name: Index file
id: indexdata
run: |
cd .github/workflows
python -m pip install --upgrade pip
pip install requests==2.23.0
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
env:
SLACK_WEBHOOK_URL: ${{ secrets.CURATOR_SLACK_WEBHOOK_URL }}
with:
channel: '#ror-curation-releases'
color: 'good'
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}'

69 changes: 69 additions & 0 deletions .github/workflows/v2_temp/dev_merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Deploy to DEV on PR merge to dev branch
on:
push:
branches:
- 'dev'
paths-ignore:
- '**/README.md'
- '**/workflows/**'
env:
MERGE_SHA: ${{ github.event.after }}
REPO_INFO: ${{ github.event.repository.full_name }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}

jobs:
copy-files:
runs-on: ubuntu-latest
steps:
- name: Get Merge PR
uses: octokit/[email protected]
id: get_merge_pr
with:
route: GET /search/issues
q: 'repo:${{ github.event.repository.full_name }}+is:pr+is:closed+merge_sha_commit:${{ github.event.after }}'
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Get branch name
run: |
export url=${{ fromJson(steps.get_merge_pr.outputs.data).items[0].pull_request.url }}
echo "release_branch=$(curl ${url} | jq -r .head.ref)" >> $GITHUB_ENV
- name: checkout
uses: actions/checkout@v2
- name: Install aws cli
id: install-aws-cli
uses: unfor19/[email protected]
- name: Zip and copy files
id: copyfiles
run: |
cd ./${{ env.release_branch }}
zip files.zip *.json
aws s3 cp files.zip s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV}}/${{ env.release_branch }}-v2/files.zip
aws s3 ls s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV }}/${{ env.release_branch }}-v2/files.zip
- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
env:
SLACK_WEBHOOK_URL: ${{ secrets.CURATOR_SLACK_WEBHOOK_URL }}
with:
channel: '#ror-curation-releases'
color: 'good'
text: 'Copy status to DEV S3 Bucket: ${{ steps.copyfiles.outcome }}. Using v2. On branch: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/tree/${env.GITHUB_REF_NAME}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'
- name: Index file
id: indexdata
run: |
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_V2 }} -d ${{ env.release_branch }}-v2 -he ${{ secrets.INDEX_DEV_API_HEADERS }}
- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
env:
SLACK_WEBHOOK_URL: ${{ secrets.CURATOR_SLACK_WEBHOOK_URL }}
with:
channel: '#ror-curation-releases'
color: 'good'
text: 'DEV index status: ${{ steps.indexdata.outcome }}. Using v2. On branch: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/tree/${env.GITHUB_REF_NAME}. Directory: ${{ env.release_branch }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'

77 changes: 77 additions & 0 deletions .github/workflows/v2_temp/dev_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: PR to DEV
on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- '!main'
- '!v**'
- 'dev'
paths-ignore:
- '**/README.md'
- '.github/*'

env:
USER_INFO: ${{ github.event.pull_request.user.login }}
REPO_INFO: ${{ github.event.pull_request.base.repo.full_name }}

jobs:
check_permission:
runs-on: ubuntu-latest
steps:
- name: Get Permission
uses: octokit/[email protected]
id: get_permission
with:
route: GET /repos/${{ env.REPO_INFO }}/collaborators/${{ env.USER_INFO }}/permission
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: output
run: |
export role_name=${{ fromJson(steps.get_permission.outputs.data).role_name }}
if [[ "$role_name" == "maintain" || "$role_name" == "admin" ]]; then
exit 0
else
exit 1
fi
check_validation:
runs-on: ubuntu-latest
needs: check_permission
steps:
- name: checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Checkout validation suite
uses: actions/checkout@v2
with:
repository: ror-community/validation-suite
ref: schema-v2
path: validation-suite
- name: Validate files
id: validatefiles
run: |
mkdir files
cp ./${{github.event.pull_request.head.ref}}/*.json files/
cd validation-suite
python -m pip install --upgrade pip
pip install -r requirements.txt
curl https://raw.githubusercontent.com/ror-community/ror-schema/master/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
- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
env:
SLACK_WEBHOOK_URL: ${{ secrets.CURATOR_SLACK_WEBHOOK_URL }}
with:
channel: '#ror-curation-releases'
color: 'good'
text: 'Validation status during PR to DEV: ${{ steps.validatefiles.outcome }}. Using v2. On branch: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/tree/${env.GITHUB_HEAD_REF}. In directory: ${env.GITHUB_HEAD_REF}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'

Loading
Loading