[Préavis] Ajout d'un filtre "statut de diffusion" sur la liste (#3414) #53
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD database docker image | |
on: | |
push: | |
paths: | |
- ".github/workflows/database.yml" | |
- "infra/docker/database/*" | |
jobs: | |
build-database-image: | |
name: Build database image | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
include: | |
- pg_major: "11" | |
timescaledb_version: "1.7.4" | |
postgis_version: "2.5.5" | |
dockerfile: "pg11.Dockerfile" | |
image_version: "pg11-ts1.7.4-postgis2.5.5" | |
- pg_major: "11" | |
timescaledb_version: "2.3.1" | |
postgis_version: "3.3.4" | |
dockerfile: "pg11.Dockerfile" | |
image_version: "pg11-ts2.3.1-postgis3.3.4" | |
- pg_major: "13" | |
timescaledb_version: "2.14.2" | |
postgis_version: "3.4.2" | |
dockerfile: "pg13_16.Dockerfile" | |
image_version: "pg13-ts2.14.2-postgis3.4.2" | |
- pg_major: "16" | |
timescaledb_version: "2.14.2" | |
postgis_version: "3.4.2" | |
dockerfile: "pg13_16.Dockerfile" | |
image_version: "pg16-ts2.14.2-postgis3.4.2" | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set IMAGE_TAG | |
run: echo "IMAGE_TAG=ghcr.io/mtes-mct/monitorfish/monitorfish-database:${{ matrix.image_version }}" >> $GITHUB_ENV | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@master | |
- name: Build image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
load: true | |
builder: ${{ steps.buildx.outputs.name }} | |
file: infra/docker/database/${{ matrix.dockerfile }} | |
push: false | |
tags: ${{ env.IMAGE_TAG }} | |
build-args: | | |
PG_MAJOR=${{ matrix.pg_major }} | |
TIMESCALEDB_VERSION=${{ matrix.timescaledb_version }} | |
POSTGIS_VERSION=${{ matrix.postgis_version }} | |
- name: Push docker image to registry | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin | |
docker push ${{ env.IMAGE_TAG }} | |
build-database-upgrade-image: | |
name: Build database upgrade image | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
include: | |
- distribution: "buster" | |
from_pg_major: "11" | |
to_pg_major: "13" | |
timescaledb_version: "2.3.1" | |
postgis_version: "3.3.4" | |
dockerfile: "upgrade_pg.Dockerfile" | |
image_version: "pg11_to_pg13-ts2.3.1-postgis3.3.4" | |
- distribution: "bookworm" | |
from_pg_major: "13" | |
to_pg_major: "16" | |
timescaledb_version: "2.14.2" | |
postgis_version: "3.4.2" | |
dockerfile: "upgrade_pg.Dockerfile" | |
image_version: "pg13_to_pg16-ts2.14.2-postgis3.4.2" | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set IMAGE_TAG | |
run: echo "IMAGE_TAG=ghcr.io/mtes-mct/monitorfish/monitorfish-database-upgrade:${{ matrix.image_version }}" >> $GITHUB_ENV | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@master | |
- name: Build image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
load: true | |
builder: ${{ steps.buildx.outputs.name }} | |
file: infra/docker/database/${{ matrix.dockerfile }} | |
push: false | |
tags: ${{ env.IMAGE_TAG }} | |
build-args: | | |
DISTRIBUTION=${{ matrix.distribution }} | |
FROM_PG_MAJOR=${{ matrix.from_pg_major }} | |
TO_PG_MAJOR=${{ matrix.to_pg_major }} | |
TIMESCALEDB_VERSION=${{ matrix.timescaledb_version }} | |
POSTGIS_VERSION=${{ matrix.postgis_version }} | |
- name: Push docker image to registry | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin | |
docker push ${{ env.IMAGE_TAG }} |