Create a workflow to convert radiomics featues in json files to dataframe #2
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
name: convert-radiomics-features-json-dataframe | |
on: | |
push: | |
branches: | |
- "main" | |
paths: | |
- ".github/workflows/convert_radiomics_features_json_to_df.yml" | |
- "workflows/TotalSegmentator/Dockerfiles/convert_radiomics_features_json_to_df/Dockerfile" | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- "main" | |
paths: | |
- ".github/workflows/convert_radiomics_features_json_to_df.yml" | |
- "workflows/TotalSegmentator/Dockerfiles/convert_radiomics_features_json_to_df/Dockerfile" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
- name: Get Git Commit Hash | |
id: git-commit-hash | |
run: | | |
COMMIT_HASH=$(git rev-parse HEAD) | |
echo "COMMIT_HASH=$COMMIT_HASH" >> $GITHUB_ENV | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
imagingdatacommons/convert_radiomics_features_json_to_df | |
- name: Login to Docker Hub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and Push Docker image to Docker Hub | |
if: | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./workflows/TotalSegmentator/Dockerfiles/convert_radiomics_features_json_to_df/Dockerfile | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
build-args: | | |
GIT_HASH=${{ env.COMMIT_HASH }} | |
env: | |
COMMIT_HASH: ${{ env.COMMIT_HASH }} |