Skip to content

added workflow to build container image for postgres based on dev #1

added workflow to build container image for postgres based on dev

added workflow to build container image for postgres based on dev #1

name: Build Docker Container
on:
push:
branches:
- buildWorkflowforDev
pull_request:
branches:
- buildWorkflowforDev
jobs:
build:
runs-on: ubuntu-latest
env:
GOPATH: '$HOME/cdev'
GOBIN: '$GOPATH/bin'
PATH: '$PATH:$GOBIN'
BASE_IMAGE: 'rockylinux:9'
CONTAINERIMAGE: 'rockylinux/rockylinux:9-ubi-micro'
IMAGE_REPOSITORY: 'docker.io'
BASEOS: 'rocky9'
PACKAGER: 'dnf'
CONTAINERSUITE: 'cybertec-pg-container'
PGBACKREST_VERSION: '2.51'
CCPROOT: '$GOPATH/src/github.com/cybertec/cybertec-pg-container'
PATRONI_VERSION: '3.3.0'
POSTGIS_VERSION: '32'
PGVERSION: '16'
PGVERSION_FULL: '16.3'
OLD_PG_VERSIONS: '13 14 15'
BUILD: '1'
ARCH: 'amd64'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set Docker image name and tag
id: vars
run: |
IMAGE_NAME=cybertecpostgresql/cybertec-pg-container
IMAGE_TAG="postgres-$PGVERSION_FULL-dev-$(date +%Y%m%d%H%M%S)"
echo "::set-output name=name::$IMAGE_NAME"
echo "::set-output name=tag::$IMAGE_TAG"
- name: Build and push Docker image
env:
NAME: ${{ steps.vars.outputs.name }}
TAG: ${{ steps.vars.outputs.tag }}
run: |
make postgres
make push