-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (56 loc) · 1.88 KB
/
convert_radiomics_features_json_to_df.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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 }}