Skip to content

Provision of resources in a popular cloud providers for PostgreSQL cluster deployment #463

Provision of resources in a popular cloud providers for PostgreSQL cluster deployment

Provision of resources in a popular cloud providers for PostgreSQL cluster deployment #463

Workflow file for this run

---
name: "Docker"
on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set TERM environment variable
run: echo "TERM=xterm" >> $GITHUB_ENV
- name: Extract branch or tag name
shell: bash
run: |
REF_NAME=""
if [[ -n "${GITHUB_HEAD_REF}" ]]; then
# This is a PR, use the source branch name
REF_NAME="${GITHUB_HEAD_REF}"
else
# This is a push, use the branch or tag name from GITHUB_REF
REF_NAME="${GITHUB_REF##*/}"
fi
# If this is the master branch, use 'latest' as the tag, otherwise use the REF_NAME
if [[ "$REF_NAME" == "master" ]]; then
echo "TAG=latest" >> $GITHUB_ENV
else
echo "TAG=$REF_NAME" >> $GITHUB_ENV
fi
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: make bootstrap-dev
- name: Run Docker lint
run: make docker-lint
- name: Run Docker build
run: make docker-build
env:
TAG: ${{ env.TAG }}
- name: Run Docker push
run: make docker-push
env:
TAG: ${{ env.TAG }}
DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_USERNAME }}
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}