@@ -3,29 +3,45 @@ name: docker-branch
3
3
on :
4
4
push :
5
5
branches :
6
- - ' * ' # matches every branch that doesn't contain a '/'
7
- - ' */*' # matches every branch containing a single '/'
8
- - ' ** ' # matches every branch
9
- - ' !master' # excludes master
6
+ - " * " # matches every branch that doesn't contain a '/'
7
+ - " */*" # matches every branch containing a single '/'
8
+ - " ** " # matches every branch
9
+ - " !master" # excludes master
10
10
11
11
jobs :
12
12
main :
13
13
runs-on : ubuntu-latest
14
14
steps :
15
- -
16
- name : Set up QEMU
15
+ - name : Set up QEMU
17
16
uses : docker/setup-qemu-action@v1
18
- -
19
- name : Set up Docker Buildx
17
+
18
+ - name : Set up Docker Buildx
20
19
uses : docker/setup-buildx-action@v1
21
- -
22
- name : Login to DockerHub
20
+
21
+ - name : Login to DockerHub
23
22
uses : docker/login-action@v1
24
23
with :
25
24
username : ${{ secrets.DOCKERHUB_USERNAME }}
26
25
password : ${{ secrets.DOCKERHUB_TOKEN }}
27
- - uses : actions/checkout@v2
28
- - uses : benjlevesque/short-sha@v1.2
26
+
27
+ - name : clone main repository
28
+ uses : actions/checkout@v2
29
+
30
+ - name : clone submodule
31
+ uses : actions/checkout@v2
32
+ with :
33
+ repository : chiselwright/hydejack-pro
34
+ path : " #jekyll-theme-hydejack"
35
+ ssh-key : ${{ secrets.SSH_KEY }}
36
+ persist-credentials : true
37
+
38
+ - name : checkout submodule
39
+ run : |
40
+ git submodule init
41
+ git submodule update
42
+
43
+ - name : short sha
44
+ uses : benjlevesque/short-sha@v1.2
29
45
id : short-sha
30
46
with :
31
47
length : 7
35
51
- run : echo $SHA
36
52
env :
37
53
SHA : ${{ env.SHA }}
38
- -
39
- name : Build and push
54
+
55
+ - name : build and push
40
56
id : docker_build
41
57
uses : docker/build-push-action@v2
42
58
with :
45
61
build-args : |
46
62
arg1=value1
47
63
arg2=value2
48
- -
49
- name : Image digest
64
+
65
+ - name : image digest
50
66
run : echo ${{ steps.docker_build.outputs.digest }}
1 commit comments
Aschen commentedon Feb 17, 2021
Hey @chiselwright ✋
Just saw your commit referencing the issue about cloning private submodules, instead of using SSH key you can use a personal access token