Skip to content

Commit 09eeaf5

Browse files
committed
Merge remote-tracking branch 'upstream/master' into cache-v1.0.1
2 parents 88b276b + 0d2ea21 commit 09eeaf5

File tree

1 file changed

+34
-22
lines changed

1 file changed

+34
-22
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ on:
44
push:
55
branches:
66
- '**'
7+
pull_request:
78
delete:
89

910
jobs:
10-
build_and_push:
11+
build:
1112
runs-on: ubuntu-latest
1213

1314
steps:
@@ -16,18 +17,32 @@ jobs:
1617
node-version: 12.x
1718

1819
- 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]'
1929
2030
- uses: satackey/push-prebuilt-action@v0.2.0-beta3
2131
with:
32+
commit-message: ${{ steps.info.outputs.commit_message }}
2233
push-branch: '{branch}-release'
2334

35+
- uses: actions/upload-artifact@v2
36+
with:
37+
name: built
38+
path: ./
39+
2440
#
2541
# test built image caching
2642

2743
test_saving_built:
2844
runs-on: ubuntu-latest
29-
needs:
30-
- build_and_push
45+
needs: build
3146

3247
steps:
3348
- uses: actions/checkout@v2
@@ -37,11 +52,11 @@ jobs:
3752
id: extract
3853
run: |
3954
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
4358
with:
44-
ref: ${{ steps.extract.outputs.branch }}-release
59+
name: built
4560
path: action-dlc
4661

4762
- uses: ./action-dlc
@@ -54,8 +69,7 @@ jobs:
5469

5570
test_restoring_built:
5671
runs-on: ubuntu-latest
57-
needs:
58-
- test_saving_built
72+
needs: test_saving_built
5973

6074
steps:
6175
- uses: actions/checkout@v2
@@ -66,10 +80,10 @@ jobs:
6680
run: |
6781
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"
6882
69-
- uses: actions/checkout@v2
70-
name: Pull action
83+
- name: Download action
84+
uses: actions/download-artifact@v2
7185
with:
72-
ref: ${{ steps.extract.outputs.branch }}-release
86+
name: built
7387
path: action-dlc
7488

7589
- uses: ./action-dlc
@@ -106,19 +120,18 @@ jobs:
106120

107121
test_saving_pulled:
108122
runs-on: ubuntu-latest
109-
needs:
110-
- build_and_push
123+
needs: build
111124

112125
steps:
113126
- name: Extract
114127
id: extract
115128
run: |
116129
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"
117130
118-
- uses: actions/checkout@v2
119-
name: Pull action
131+
- name: Download action
132+
uses: actions/download-artifact@v2
120133
with:
121-
ref: ${{ steps.extract.outputs.branch }}-release
134+
name: built
122135
path: action-dlc
123136

124137
- uses: ./action-dlc
@@ -131,19 +144,18 @@ jobs:
131144

132145
test_restoring_pulled:
133146
runs-on: ubuntu-latest
134-
needs:
135-
- test_saving_pulled
147+
needs: test_saving_pulled
136148

137149
steps:
138150
- name: Extract
139151
id: extract
140152
run: |
141153
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"
142154
143-
- uses: actions/checkout@v2
144-
name: Pull action
155+
- name: Download action
156+
uses: actions/download-artifact@v2
145157
with:
146-
ref: ${{ steps.extract.outputs.branch }}-release
158+
name: built
147159
path: action-dlc
148160

149161
- uses: ./action-dlc

0 commit comments

Comments
 (0)