kopia lustrzana https://github.com/kartoza/docker-postgis
Implement Github Action for base image
rodzic
09c57349ee
commit
dd0613f56e
|
@ -0,0 +1,40 @@
|
||||||
|
name: build-latest
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
distro:
|
||||||
|
description: Base image distro
|
||||||
|
required: true
|
||||||
|
default: debian
|
||||||
|
imageVersion:
|
||||||
|
description: Base distro image version/release
|
||||||
|
required: true
|
||||||
|
default: bullseye
|
||||||
|
imageVariant:
|
||||||
|
description: Base image variant
|
||||||
|
required: true
|
||||||
|
default: slim
|
||||||
|
push:
|
||||||
|
jobs:
|
||||||
|
build-base:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build base image
|
||||||
|
id: docker_build
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: base_build
|
||||||
|
file: Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{ secrets.DOCKERHUB_REPO }}/postgis:${{ github.event.inputs.distro }}-${{ github.event.inputs.imageVersion }}-${{ github.event.inputs.imageVariant }}
|
4
build.sh
4
build.sh
|
@ -2,8 +2,8 @@
|
||||||
POSTGRES_MAJOR_VERSION=13
|
POSTGRES_MAJOR_VERSION=13
|
||||||
POSTGIS_MINOR_RELEASE=1
|
POSTGIS_MINOR_RELEASE=1
|
||||||
|
|
||||||
cd base_build
|
pushd base_build
|
||||||
./build.sh
|
./build.sh
|
||||||
cd ..
|
popd
|
||||||
docker build -t kartoza/postgis:manual-build .
|
docker build -t kartoza/postgis:manual-build .
|
||||||
docker build --build-arg DISTRO=debian --build-arg IMAGE_VERSION=bullseye --build-arg IMAGE_VARIANT=slim -t kartoza/postgis:${POSTGRES_MAJOR_VERSION}.${POSTGIS_MINOR_RELEASE} .
|
docker build --build-arg DISTRO=debian --build-arg IMAGE_VERSION=bullseye --build-arg IMAGE_VARIANT=slim -t kartoza/postgis:${POSTGRES_MAJOR_VERSION}.${POSTGIS_MINOR_RELEASE} .
|
||||||
|
|
Ładowanie…
Reference in New Issue