Skip to content

Bump docker/login-action from 2 to 3 #17

Bump docker/login-action from 2 to 3

Bump docker/login-action from 2 to 3 #17

Workflow file for this run

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: bookworm
# imageVariant:
# description: Base image variant
# required: true
# default: slim
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
- develop
jobs:
run-scenario-tests:
runs-on: ubuntu-latest
strategy:
matrix:
postgresMajorVersion:
- 15
postgisMajorVersion:
- 3
postgisMinorRelease:
- 4
scenario:
- restore
- s3
include:
- distro: debian
imageVersion: bookworm
imageVariant: slim
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image for testing
id: docker_build_testing_image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: false
load: true
tags: kartoza/pg-backup:manual-build
build-args: |
POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }}
POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }}
POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }}
cache-from: |
type=gha,scope=test
type=gha,scope=prod
type=gha,scope=base
cache-to: type=gha,scope=test
target: postgis-backup-test
- name: Run scenario test ${{ matrix.scenario }}
working-directory: scenario_tests/${{ matrix.scenario }}
env:
COMPOSE_INTERACTIVE_NO_CLI: 1
PRINT_TEST_LOGS: 1
run: |
bash ./test.sh
push-internal-pr-images:
if: github.event.pull_request.base.repo.url == github.event.pull_request.head.repo.url
runs-on: ubuntu-latest
needs: [ run-scenario-tests ]
strategy:
matrix:
postgresMajorVersion:
- 15
postgisMajorVersion:
- 3
postgisMinorRelease:
- 4
include:
- distro: debian
imageVersion: bookworm
imageVariant: slim
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKERHUB_REPO}}/pg-backup
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=ref,event=pr
- name: Build image for testing
id: docker_build_testing_image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
tags: |
${{ steps.docker_meta.outputs.tags }}-${{ matrix.postgresMajorVersion }}-${{ matrix.postgisMajorVersion }}.${{ matrix.postgisMinorRelease }}
build-args: |
POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }}
POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }}
POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }}
cache-from: |
type=gha,scope=test
type=gha,scope=prod
cache-to: type=gha,scope=test
target: postgis-backup-test