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

create gh actions using reusable actions #19

Closed

Conversation

vkt1414
Copy link
Collaborator

@vkt1414 vkt1414 commented Nov 29, 2023

I closed PR 18 by addressing the changes requested. In addition, I made more changes as I realized creating a class would help us reuse the code for addressing the next task in ImagingDataCommons/idc-index-data#2. I wanted to move away from gh api as much as possible as it may not be reusable for future tasks. Instead, I tried to use available gh actions to do the heavy lifting.

This workflow will address task 1 of ImagingDataCommons/idc-index-data#2

It will get the current version of IDC referenced in the index and check if it is outdated wrt to the IDC release referenced by the bigquery-public-data.idc_current.dicom_all view in bigquery. If it is outdated, it will update the version in each of the queries in the queries/ folder of the repo, run them using bigquery, and generate a {query_file_prefix}.csv.zip for each query. It will also update the version in index.py.

It then creates a new release with the 'latest' tag, and uploads the csv.zip files as a release attachment.

Lastly, it will create a pull request to update the SQL queries in the queries/ folder and the index.py

Note: We must create two GitHub secrets called SERVICE_ACCOUNT_KEY and GCP_PROJECT_ID

@vkt1414 vkt1414 requested a review from fedorov November 29, 2023 21:58
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}

- name: Update latest tag's source code
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't necessary anymore, crowbarmaster action updates the source code also.

@vkt1414
Copy link
Collaborator Author

vkt1414 commented Dec 5, 2023

following up on yesterday's conversation, the gha actually does what's asked in ImagingDataCommons/idc-index-data#2. However, for reassurance, we can test the updated index before creating a release following similar logic in PR #20

@vkt1414 vkt1414 mentioned this pull request Jan 2, 2024
@fedorov fedorov marked this pull request as draft February 15, 2024 14:01
@vkt1414
Copy link
Collaborator Author

vkt1414 commented Mar 21, 2024

Closing this PR as there is CI/CD already now

@vkt1414 vkt1414 closed this Mar 21, 2024
@vkt1414 vkt1414 deleted the gha-for-latest-idc-index branch March 23, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant