Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix action publishing images #94

Merged
merged 2 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 7 additions & 29 deletions .github/workflows/build-latest.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,28 @@
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
- master
jobs:
run-scenario-tests:
runs-on: ubuntu-latest
strategy:
matrix:
postgresMajorVersion:
- 15
- 16
postgisMajorVersion:
- 3
postgisMinorRelease:
- 4
scenario:
- restore
- s3
include:
- distro: debian
imageVersion: bookworm
imageVariant: slim
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -57,7 +39,7 @@ jobs:
build-args: |
POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }}
POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }}
POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }}
POSTGIS_MINOR_VERSION=${{ matrix.postgisMinorRelease }}
cache-from: |
type=gha,scope=test
type=gha,scope=prod
Expand All @@ -80,17 +62,13 @@ jobs:
strategy:
matrix:
postgresMajorVersion:
- 15
- 16
postgisMajorVersion:
- 3
postgisMinorRelease:
- 4
include:
- distro: debian
imageVersion: bookworm
imageVariant: slim
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand Down Expand Up @@ -122,7 +100,7 @@ jobs:
build-args: |
POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }}
POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }}
POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }}
POSTGIS_MINOR_VERSION=${{ matrix.postgisMinorRelease }}
cache-from: |
type=gha,scope=test
type=gha,scope=prod
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/deploy-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,13 @@ jobs:
strategy:
matrix:
postgresMajorVersion:
- 15
- 16
postgisMajorVersion:
- 3
postgisMinorRelease:
- 4
include:
- distro: debian
imageVersion: bookworm
imageVariant: slim
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -46,6 +42,7 @@ jobs:
now = datetime.datetime.utcnow()
print(f'::set-output name=formatted::{now:%Y.%m.%d}')


- name: Build prod image
id: docker_build_prod
uses: docker/build-push-action@v5
Expand All @@ -55,14 +52,12 @@ jobs:
file: Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_REPO }}/pg-backup:${{ matrix.postgresMajorVersion }}
${{ secrets.DOCKERHUB_REPO }}/pg-backup:${{ matrix.postgresMajorVersion }}-${{ matrix.postgisMajorVersion }}
${{ secrets.DOCKERHUB_REPO }}/pg-backup:${{ matrix.postgresMajorVersion }}-${{ matrix.postgisMajorVersion }}.${{ matrix.postgisMinorRelease }}
${{ secrets.DOCKERHUB_REPO }}/pg-backup:${{ matrix.postgresMajorVersion }}-${{ matrix.postgisMajorVersion }}.${{ matrix.postgisMinorRelease }}--v${{ steps.current_date.outputs.formatted }}
build-args: |
POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }}
POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }}
POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }}
POSTGIS_MINOR_VERSION=${{ matrix.postgisMinorRelease }}
cache-from: |
type=gha,scope=test
type=gha,scope=prod
Expand Down