Skip to content

Commit 8102db6

Browse files
committed
improve dubbo version
1 parent ff5e4f6 commit 8102db6

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

.github/workflows/build-and-test.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ env:
1818
jobs:
1919
build-source:
2020
runs-on: ubuntu-18.04
21+
outputs:
22+
version: ${{ steps.dubbo-version.outputs.version }}
2123
steps:
2224
- uses: actions/checkout@v2
2325
with:
@@ -49,15 +51,11 @@ jobs:
4951
cd ./dubbo-spring-boot-project
5052
./mvnw --batch-mode --no-transfer-progress clean install -Dmaven.test.skip=true -Dmaven.test.skip.exec=true
5153
- name: "Calculate Dubbo Version"
54+
id: dubbo-version
5255
run: |
5356
REVISION=`awk '/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print $1;exit;}' ./dubbo/pom.xml`
54-
mkdir dubbo-version
55-
echo $REVISION > dubbo-version/dubbo-version
56-
- name: "Upload Dubbo version"
57-
uses: actions/upload-artifact@v2
58-
with:
59-
name: dubbo-version
60-
path: dubbo-version
57+
echo "::set-output name=version::$REVISION"
58+
echo "dubbo version: $REVISION"
6159
6260
unit-test:
6361
needs: [build-source]
@@ -146,18 +144,13 @@ jobs:
146144
with:
147145
name: test-list
148146
path: test/jobs/
149-
- name: "Download Dubbo version"
150-
uses: actions/download-artifact@v2
151-
with:
152-
name: dubbo-version
153-
path: dubbo-version
154147
- name: "Set up JDK 8"
155148
uses: actions/setup-java@v1
156149
with:
157150
java-version: 8
158151
- name: "Init Candidate Versions"
159152
run: |
160-
DUBBO_VERSION=`cat dubbo-version/dubbo-version`
153+
DUBBO_VERSION="${{needs.build-source.outputs.version}}"
161154
CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS"
162155
echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV
163156
- name: "Build test image"

0 commit comments

Comments
 (0)