1- name : buildx Docker PostGIS CI (experimental)
1+ name : buildx-qemu-experimental-build
2+ # Building NOT`linux/amd64`images !
23
34on :
45 push :
56 pull_request :
67 schedule :
7- - cron : ' 15 5 * * 2 '
8+ - cron : ' 15 6 * * 1 '
89
910defaults :
1011 run :
@@ -14,29 +15,33 @@ jobs:
1415
1516 make-docker-images :
1617 strategy :
17- # fail-fast: false
18+ # allowing fails ..
19+ fail-fast : false
1820 matrix :
21+ # expecting:
22+ # - "postgres" docker images OS/ARCH=platforms should be exists
23+ # [ https://hub.docker.com/_/postgres/tags ]
1924 #
20- platforms : [ 'linux/arm64','linux/arm/v7','linux/arm/v6','linux/386','linux/ppc64le']
21- #
22- # platforms: ['linux/arm64','linux/arm/v7','linux/arm/v6','linux/386','linux/mips64le','linux/ppc64le','linux/s390x']
23- #
24- # comments:
25- # 'linux/arm/v7 ' - default/ debian: Unable to locate package postgresql-14-postgis-3;
26- # 'linux/arm/v6' - default/debian: Unable to locate package postgresql-14-postgis-3;
27- # 'linux/s390x' alpine: failed test.
28- # 'linux/mips64le' alpine failed test .
25+ # platform= 'linux/amd64' building with the `main.yml' !
26+ # Not for the `*-master``building. Emulation takes lot of times!
27+ # `
28+ # comments: 2022-09-07
29+ # 'linux/arm/v7' - debian: Unable to locate package postgresql-14-postgis-3;
30+ # 'linux/arm/v6 ' - debian: Unable to locate package postgresql-14-postgis-3;
31+ # 'linux/s390x' [alpine|debian] failed test.
32+ # 'linux/mips64le' [ alpine|debian] failed test.
33+ # .. .
2934 #
35+ # succesful tests matrix:
36+ platforms : ['linux/arm64','linux/arm/v7','linux/arm/v6','linux/386','linux/ppc64le']
3037 postgres : [14]
3138 postgis : ['3.2']
3239 variant : [alpine]
3340 include :
34-
3541 - postgres : 14
3642 postgis : ' 3.2'
3743 variant : ' default'
3844 platforms : ' linux/arm64'
39-
4045 - postgres : 14
4146 postgis : ' 3.2'
4247 variant : ' default'
6671 - name : " docker buildx ls"
6772 run : docker buildx ls
6873
69- - if : ${{ env.VARIANT == 'alpine' }}
74+ - name : " Inspect the base alpine image postgres:${{ matrix.postgres }}-alpine3.16"
75+ if : ${{ env.VARIANT == 'alpine' }}
7076 run : docker pull --platform=${{ matrix.platforms }} postgres:${{ matrix.postgres }}-alpine3.16 && docker inspect postgres:${{ matrix.postgres }}-alpine3.16
7177 env :
7278 DOCKER_DEFAULT_PLATFORM : ${{ matrix.platforms }}
7783 env :
7884 DOCKER_DEFAULT_PLATFORM : ${{ matrix.platforms }}
7985 PLATFORM : ${{ matrix.platforms }}
86+ # Buildx/qemu test need more time
8087 POSTGRES_TEST_TRIES : 42
8188 POSTGRES_TEST_SLEEP : 2
8289
@@ -89,20 +96,21 @@ jobs:
8996 - if : ${{ env.VARIANT == 'alpine' }}
9097 run : docker inspect postgis/postgis:${{ env.VERSION }}-${{ env.VARIANT }}
9198
92- # --- temp security commenting ----#
93- # - name: Login to dockerhub
94- # uses: docker/login-action@v1
95- # if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }}
96- # with:
97- # username: ${{ secrets.DOCKERHUB_USERNAME }}
98- # password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
99- #
100- # - name: Push docker image to dockerhub
101- # if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }}
102- # env:
103- # DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
104- # DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
105- # DOCKERHUB_ACCESS_TOKEN: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
106- # DOCKER_DEFAULT_PLATFORM: ${{ matrix.platforms }}
107- # PLATFORM: ${{ matrix.platforms }}
108- # run: make push
99+ - name : Login to dockerhub
100+ uses : docker/login-action@v1
101+ if : ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }}
102+ with :
103+ username : ${{ secrets.DOCKERHUB_USERNAME }}
104+ password : ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
105+
106+ - name : Push docker image to dockerhub - ${{ matrix.platforms }}
107+ if : ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }}
108+ env :
109+ # platform is important!
110+ DOCKER_DEFAULT_PLATFORM : ${{ matrix.platforms }}
111+ PLATFORM : ${{ matrix.platforms }}
112+ #
113+ DOCKERHUB_USERNAME : ${{ secrets.DOCKERHUB_USERNAME }}
114+ DOCKERHUB_PASSWORD : ${{ secrets.DOCKERHUB_PASSWORD }}
115+ DOCKERHUB_ACCESS_TOKEN : ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
116+ run : make push
0 commit comments