File tree 1 file changed +23
-4
lines changed
1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ name: "initial-image-build-workflow"
3
3
on :
4
4
# Trigger a specific workflow run on demand without need for a code push/pull request
5
5
workflow_dispatch :
6
- # inputs:
7
- # githubRepo:
8
- # description: "Link of public github repo to deploy"
9
- # required: true
6
+ inputs :
7
+ githubRepo :
8
+ description : " Link of public github repo to deploy"
9
+ required : true
10
10
11
11
jobs :
12
12
create_docker_image :
40
40
fi
41
41
cd ./submissions-${year}
42
42
43
+ - name : Add student's repo as a submodule
44
+ - run : |
45
+ user_name=username=$(echo "${githubRepo}" | cut -d'/' -f4)
46
+ repo_name=$(echo "${githubRepo}" | cut -d'/' -f5)
47
+
48
+ if [ ! -d ${user_name}-${repo_name} ]; then
49
+ echo "Adding the #{githubRepo} to ${user_name}-${repo_name} as a submodule"
50
+
51
+ git config --global user.name github-actions
52
+ git config --global user.email [email protected]
53
+
54
+ git submodule add ${githubRepo} ${user_name}-${repo_name}
55
+ git commit -m "Added ${user_name}-${repo_name} as a submodule by github-actions"
56
+ git push
57
+ else
58
+ echo "Submodule already exists, terminating github actions"
59
+ fi
60
+ cd ./ ${user_name}-${repo_name}
61
+
43
62
# need to add export DOCKER_BUILDKIT=1 before building python docker image
You can’t perform that action at this time.
0 commit comments