File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow will build a Java project with Maven
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3
+
4
+ name : PIG 镜像 action
5
+
6
+ on :
7
+ push :
8
+ branches : [ jdk17-dev ]
9
+
10
+ jobs :
11
+ build :
12
+ runs-on : ubuntu-latest
13
+ strategy :
14
+ matrix :
15
+ java-version : [ 17 ]
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+ - name : Set up JDK ${{ matrix.java-version }}
19
+ uses : actions/setup-java@v4
20
+ with :
21
+ java-version : ${{ matrix.java-version }}
22
+ distribution : ' zulu'
23
+
24
+ - name : mvn clean install
25
+ run : mvn clean install -Pcloud
26
+
27
+ - name : Login to Docker Registry
28
+ run : docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} registry.cn-hangzhou.aliyuncs.com
29
+
30
+ - name : Build and push Docker images
31
+ run : |
32
+ docker-compose build
33
+ registry="registry.cn-hangzhou.aliyuncs.com/pigx/"
34
+ for service in $(docker-compose config --services); do
35
+ if [ "$service" != "pig-redis" ]; then
36
+ docker tag ${service}:latest ${registry}${service}:latest
37
+ docker push ${registry}${service}:latest
38
+ else
39
+ echo "Skipping pig-redis service"
40
+ fi
41
+ done
You can’t perform that action at this time.
0 commit comments