-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
140 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
name: buildx Docker PostGIS CI (experimental) | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '15 5 * * 2' | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
|
||
make-docker-images: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# | ||
platforms: ['linux/arm64','linux/arm/v7','linux/arm/v6','linux/386','linux/ppc64le'] | ||
# | ||
# platforms: ['linux/arm64','linux/arm/v7','linux/arm/v6','linux/386','linux/mips64le','linux/ppc64le','linux/s390x'] | ||
# | ||
# comments: | ||
# 'linux/arm/v7' - default/debian: Unable to locate package postgresql-14-postgis-3; | ||
# 'linux/arm/v6' - default/debian: Unable to locate package postgresql-14-postgis-3; | ||
# 'linux/s390x' alpine: failed test. | ||
# 'linux/mips64le' alpine failed test. | ||
# | ||
postgres: [14] | ||
postgis: ['3.2'] | ||
variant: [alpine] | ||
include: | ||
|
||
- postgres: 14 | ||
postgis: '3.2' | ||
variant: 'default' | ||
platforms: 'linux/arm64' | ||
|
||
- postgres: 14 | ||
postgis: '3.2' | ||
variant: 'default' | ||
platforms: 'linux/ppc64le' | ||
|
||
name: ${{ matrix.platforms }} ${{ matrix.postgres }}-${{ matrix.postgis }} ${{ matrix.variant }} | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
VERSION: ${{ matrix.postgres }}-${{ matrix.postgis }} | ||
VARIANT: ${{ matrix.variant }} | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: "docker buildx inspect --bootstrap" | ||
run: docker buildx inspect --bootstrap | ||
|
||
- name: "docker buildx ls" | ||
run: docker buildx ls | ||
|
||
- if: ${{ env.VARIANT == 'alpine' }} | ||
run: docker pull --platform=${{ matrix.platforms }} postgres:${{ matrix.postgres }}-alpine3.16 && docker inspect postgres:${{ matrix.postgres }}-alpine3.16 | ||
env: | ||
DOCKER_DEFAULT_PLATFORM: ${{ matrix.platforms }} | ||
PLATFORM: ${{ matrix.platforms }} | ||
|
||
- name: Build docker image for ${{ env.VERSION }} ${{ env.VARIANT }} ${{ env.DOCKER_DEFAULT_PLATFORM }} | ||
run: make test | ||
env: | ||
DOCKER_DEFAULT_PLATFORM: ${{ matrix.platforms }} | ||
PLATFORM: ${{ matrix.platforms }} | ||
POSTGRES_TEST_TRIES: 42 | ||
POSTGRES_TEST_SLEEP: 2 | ||
|
||
- name: "docker images" | ||
run: docker images | ||
|
||
- if: ${{ env.VARIANT == 'default' }} | ||
run: docker inspect postgis/postgis:${{ env.VERSION }} | ||
|
||
- if: ${{ env.VARIANT == 'alpine' }} | ||
run: docker inspect postgis/postgis:${{ env.VERSION }}-${{ env.VARIANT }} | ||
|
||
#--- temp security commenting ----# | ||
# - name: Login to dockerhub | ||
# uses: docker/login-action@v1 | ||
# if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }} | ||
# with: | ||
# username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
# password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} | ||
# | ||
# - name: Push docker image to dockerhub | ||
# if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }} | ||
# env: | ||
# DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
# DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
# DOCKERHUB_ACCESS_TOKEN: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} | ||
# DOCKER_DEFAULT_PLATFORM: ${{ matrix.platforms }} | ||
# PLATFORM: ${{ matrix.platforms }} | ||
# run: make push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters