4
4
push :
5
5
branches :
6
6
- ' **'
7
+ pull_request :
7
8
delete :
8
9
9
10
jobs :
10
- build_and_push :
11
+ build :
11
12
runs-on : ubuntu-latest
12
13
13
14
steps :
@@ -16,18 +17,32 @@ jobs:
16
17
node-version : 12.x
17
18
18
19
- uses : actions/checkout@v2
20
+
21
+ - name : Output info
22
+ id : info
23
+ run : |
24
+ if [ '${{ github.event_name }}' = 'pull_request' ]; then
25
+ echo '::set-output name=commit_message::'
26
+ exit 0
27
+ fi
28
+ echo '::set-output name=commit_message::[auto]'
19
29
20
30
- uses : satackey/push-prebuilt-action@v0.2.0-beta3
21
31
with :
32
+ commit-message : ${{ steps.info.outputs.commit_message }}
22
33
push-branch : ' {branch}-release'
23
34
35
+ - uses : actions/upload-artifact@v2
36
+ with :
37
+ name : built
38
+ path : ./
39
+
24
40
#
25
41
# test built image caching
26
42
27
43
test_saving_built :
28
44
runs-on : ubuntu-latest
29
- needs :
30
- - build_and_push
45
+ needs : build
31
46
32
47
steps :
33
48
- uses : actions/checkout@v2
@@ -37,11 +52,11 @@ jobs:
37
52
id : extract
38
53
run : |
39
54
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"
40
-
41
- - uses : actions/checkout@v2
42
- name : Pull action
55
+
56
+ - name : Download action
57
+ uses : actions/download-artifact@v2
43
58
with :
44
- ref : ${{ steps.extract.outputs.branch }}-release
59
+ name : built
45
60
path : action-dlc
46
61
47
62
- uses : ./action-dlc
54
69
55
70
test_restoring_built :
56
71
runs-on : ubuntu-latest
57
- needs :
58
- - test_saving_built
72
+ needs : test_saving_built
59
73
60
74
steps :
61
75
- uses : actions/checkout@v2
@@ -66,10 +80,10 @@ jobs:
66
80
run : |
67
81
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"
68
82
69
- - uses : actions/checkout@v2
70
- name : Pull action
83
+ - name : Download action
84
+ uses : actions/download-artifact@v2
71
85
with :
72
- ref : ${{ steps.extract.outputs.branch }}-release
86
+ name : built
73
87
path : action-dlc
74
88
75
89
- uses : ./action-dlc
@@ -106,19 +120,18 @@ jobs:
106
120
107
121
test_saving_pulled :
108
122
runs-on : ubuntu-latest
109
- needs :
110
- - build_and_push
123
+ needs : build
111
124
112
125
steps :
113
126
- name : Extract
114
127
id : extract
115
128
run : |
116
129
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"
117
130
118
- - uses : actions/checkout@v2
119
- name : Pull action
131
+ - name : Download action
132
+ uses : actions/download-artifact@v2
120
133
with :
121
- ref : ${{ steps.extract.outputs.branch }}-release
134
+ name : built
122
135
path : action-dlc
123
136
124
137
- uses : ./action-dlc
@@ -131,19 +144,18 @@ jobs:
131
144
132
145
test_restoring_pulled :
133
146
runs-on : ubuntu-latest
134
- needs :
135
- - test_saving_pulled
147
+ needs : test_saving_pulled
136
148
137
149
steps :
138
150
- name : Extract
139
151
id : extract
140
152
run : |
141
153
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"
142
154
143
- - uses : actions/checkout@v2
144
- name : Pull action
155
+ - name : Download action
156
+ uses : actions/download-artifact@v2
145
157
with :
146
- ref : ${{ steps.extract.outputs.branch }}-release
158
+ name : built
147
159
path : action-dlc
148
160
149
161
- uses : ./action-dlc
0 commit comments