File tree 2 files changed +25
-7
lines changed
2 files changed +25
-7
lines changed Original file line number Diff line number Diff line change 1
- name : Build and Test
2
-
3
- on :
4
- [push, pull_request]
5
-
1
+ name : CI
2
+ on : push
6
3
jobs :
7
4
ci :
8
5
runs-on : ubuntu-latest
91
88
env :
92
89
CI_VERSION : ${{ matrix.version }}
93
90
SKIP_CLEANUP : 1
91
+
92
+ - name : Login to Docker Hub
93
+ if : ${{ github.ref == 'refs/heads/main' }}
94
+ uses : docker/login-action@v3
95
+ with :
96
+ username : ${{ vars.DOCKER_HUB_USERNAME }}
97
+ password : ${{ secrets.DOCKER_HUB_PERSONAL_ACCESS_TOKEN }}
98
+
99
+ - name : Push Docker image
100
+ if : ${{ github.ref == 'refs/heads/main' }}
101
+ run : ./push.sh
102
+ env :
103
+ CI_VERSION : ${{ matrix.version }}
Original file line number Diff line number Diff line change @@ -6,7 +6,10 @@ source ./versions.sh
6
6
build_cmd () {
7
7
docker build --build-arg " METEOR_VERSION=$1 " --tag geoffreybooth/meteor-base:" $1 " ./src
8
8
if [[ $1 == $latest_version ]]; then
9
- docker tag geoffreybooth/meteor-base:" $1 " geoffreybooth/meteor-base:latest
9
+ if ! docker tag geoffreybooth/meteor-base:" $1 " geoffreybooth/meteor-base:latest; then
10
+ printf " ${RED} Error tagging Docker base image for Meteor (latest version)${NC} \n"
11
+ exit 1
12
+ fi
10
13
fi
11
14
}
12
15
26
29
27
30
28
31
if [[ " ${# versions[@]} " -eq 1 ]]; then
29
- printf " ${GREEN} Success building Docker base image for Meteor ${versions} \n"
32
+ printf " ${GREEN} Success building Docker base image for Meteor ${versions} "
33
+ if [[ " ${versions[0]} " == $latest_version ]]; then
34
+ printf " (latest version)\n"
35
+ else
36
+ printf " \n"
37
+ fi
30
38
else
31
39
printf " ${GREEN} Success building Docker base images for all supported Meteor versions\n"
32
40
fi
You can’t perform that action at this time.
0 commit comments