Skip to content

upgrade pgtap to 1.3.1 #58

upgrade pgtap to 1.3.1

upgrade pgtap to 1.3.1 #58

Workflow file for this run

name: Main Workflow
on:
push:
paths:
- '!**'
- 'Dockerfile'
- '.github/workflows/*.yml'
- 'docker-entrypoint-initdb.d/**'
branches:
- master
pull_request:
paths:
- '!**'
- 'Dockerfile'
- '.github/workflows/*.yml'
- 'docker-entrypoint-initdb.d/**'
branches:
- '**'
schedule:
- cron: "0 0 1 * *"
jobs:
container-build:
name: Container Image Build (${{ matrix.pgtap-version }}, ${{ matrix.pg-version }})
runs-on: ubuntu-latest
strategy:
matrix:
pgtap-version: [1.3.1]
pg-version: [9.6-alpine, 9-alpine, 10-alpine, 11-alpine, 12-alpine, 13-alpine, 14-alpine, 15-alpine, 16-alpine, alpine]
steps:
- uses: actions/checkout@v2
- name: Configure Environment
shell: bash
run: |
export IMAGE_NAME=pgtap
export IMAGE_TAG=${{ matrix.pgtap-version }}-pg${{ matrix.pg-version }}
echo "::set-env name=IMAGE_NAME::${IMAGE_NAME}"
echo "::set-env name=IMAGE_TAG::${IMAGE_TAG}"
echo "::set-env name=IMAGE::${IMAGE_NAME}:${IMAGE_TAG}"
echo "::set-env name=BUILD_IMAGE::quay.io/twyla-ai/${IMAGE_NAME}"
- name: Build Image
shell: bash
run: |
docker build \
--build-arg "PGTAP_VERSION=${{ matrix.pgtap-version }}" \
--build-arg "PG_CONTAINER_VERSION=${{ matrix.pg-version }}" \
-t ${BUILD_IMAGE} .
- name: Test Image
shell: bash
run: |
pushd ./examples
docker-compose up --renew-anon-volumes --abort-on-container-exit tests
popd
- name: Docker Login
if: github.ref == 'refs/heads/master'
run: |
docker login -u publisher -p ${{ secrets.GITHUB_TOKEN }} docker.pkg.github.com
docker login -u ${{ secrets.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_PASSWORD }} quay.io
- name: Publish Tagged Image
if: ${{ github.ref == 'refs/heads/master' && matrix.pg-version != 'alpine' }}
shell: bash
run: |
for i in docker.pkg.github.com/${GITHUB_REPOSITORY} quay.io/twyla-ai; do
docker tag ${BUILD_IMAGE} ${i}/${IMAGE}
docker image push ${i}/${IMAGE}
done
- name: Publish Latest Image
if: ${{ github.ref == 'refs/heads/master' && matrix.pg-version == 'alpine' }}
shell: bash
run: |
for i in docker.pkg.github.com/${GITHUB_REPOSITORY} quay.io/twyla-ai; do
docker tag ${BUILD_IMAGE} ${i}/${IMAGE_NAME}:latest
docker image push ${i}/${IMAGE_NAME}:latest
done