From 76844d87f00c45926fdf231306eb865a4d5feac7 Mon Sep 17 00:00:00 2001 From: t3hmrman Date: Tue, 19 Dec 2023 07:35:14 +0000 Subject: [PATCH] release: pg_idkit 0.2.1 Signed-off-by: GitHub --- .../workflows/build-and-test-gnu/action.yaml | 12 +++++------ .github/workflows/container.yaml | 20 +++++++++++-------- CHANGELOG | 7 +++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- Justfile | 7 ++----- 6 files changed, 29 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-and-test-gnu/action.yaml b/.github/workflows/build-and-test-gnu/action.yaml index 12afe3c..9e9385f 100644 --- a/.github/workflows/build-and-test-gnu/action.yaml +++ b/.github/workflows/build-and-test-gnu/action.yaml @@ -125,7 +125,7 @@ runs: PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }} PKG_PG_VERSION: ${{ inputs.pg-version }} SCCACHE_DIR: ${{ inputs.sccache-dir }} - USER: ${{ inputs.user }} + DOCKER_BUILD_USER: ${{ inputs.user }} run: | su idkit -c "cargo install --force cargo-get cargo-edit" @@ -146,7 +146,7 @@ runs: PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }} PKG_PG_VERSION: ${{ inputs.pg-version }} SCCACHE_DIR: ${{ inputs.sccache-dir }} - USER: ${{ inputs.user }} + DOCKER_BUILD_USER: ${{ inputs.user }} run: | su idkit -c "just pgrx-init" @@ -163,7 +163,7 @@ runs: PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }} PKG_PG_VERSION: ${{ inputs.pg-version }} SCCACHE_DIR: ${{ inputs.sccache-dir }} - USER: ${{ inputs.user }} + DOCKER_BUILD_USER: ${{ inputs.user }} run: | su idkit -c "cargo check" @@ -180,7 +180,7 @@ runs: PGRX_PKG_PATH_PREFIX: ${{ inputs.cargo-target-dir }} PKG_PG_VERSION: ${{ inputs.pg-version }} SCCACHE_DIR: ${{ inputs.sccache-dir }} - USER: ${{ inputs.user }} + DOCKER_BUILD_USER: ${{ inputs.user }} run: | su idkit -c "cargo build" @@ -196,7 +196,7 @@ runs: PGRX_PG_VERSION: ${{ inputs.pgrx-pg-version }} PKG_PG_VERSION: ${{ inputs.pg-version }} SCCACHE_DIR: ${{ inputs.sccache-dir }} - USER: ${{ inputs.user }} + DOCKER_BUILD_USER: ${{ inputs.user }} run: | su idkit -c "cargo test" @@ -219,7 +219,7 @@ runs: PKG_PG_VERSION: ${{ inputs.pg-version }} PKG_TARBALL_SUFFIX: ${{ inputs.artifact-tarball-suffix }} SCCACHE_DIR: ${{ inputs.sccache-dir }} - USER: ${{ inputs.user }} + DOCKER_BUILD_USER: ${{ inputs.user }} run: | su idkit -c "just package" diff --git a/.github/workflows/container.yaml b/.github/workflows/container.yaml index 815ee82..a729f22 100644 --- a/.github/workflows/container.yaml +++ b/.github/workflows/container.yaml @@ -46,18 +46,22 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build container image - run: just build-image + - name: Build container image (prerelease) + if: ${{ startsWith(github.ref, 'refs/heads/prep-release') }} + run: just build-image push-image env: CONTAINER_IMAGE_ARCH: ${{ matrix.config.container.arch }} PGRX_PG_VERSION: ${{ matrix.config.container.pg_version }} POSTGRES_IMAGE_VERSION: ${{ matrix.config.container.pg_version }} POSTGRES_OS_IMAGE_VERSION: ${{ matrix.config.container.os_version }} + PGIDKIT_IMAGE_TAG_SUFFIX: "-prerelease" - - name: Push pre-release image - if: ${{ startsWith(github.ref, 'refs/heads/prep-release') }} - run: just push-image-preprelease - - - name: Push release image + - name: Build container image if: ${{ startsWith(github.ref, 'refs/tags/v') }} - run: just push-image + run: just build-image push-image + env: + CONTAINER_IMAGE_ARCH: ${{ matrix.config.container.arch }} + PGRX_PG_VERSION: ${{ matrix.config.container.pg_version }} + POSTGRES_IMAGE_VERSION: ${{ matrix.config.container.pg_version }} + POSTGRES_OS_IMAGE_VERSION: ${{ matrix.config.container.os_version }} + diff --git a/CHANGELOG b/CHANGELOG index 0770a49..cf80290 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,13 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.2.1] - 2023-12-19 + +### Bug Fixes + +- Fix release prep PR title +- Container generation and workflows + ## [0.2.0] - 2023-12-12 ### Bug Fixes diff --git a/Cargo.lock b/Cargo.lock index ebe2c0c..73bb57d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1253,7 +1253,7 @@ dependencies = [ [[package]] name = "pg_idkit" -version = "0.2.0" +version = "0.2.1" dependencies = [ "base36", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 2b62c40..5711a57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pg_idkit" -version = "0.2.0" +version = "0.2.1" edition = "2021" authors = ["Victor Adossi "] license = "MIT" diff --git a/Justfile b/Justfile index 4e1b4a8..f472ead 100644 --- a/Justfile +++ b/Justfile @@ -140,7 +140,8 @@ pg_os_image_version := env_var_or_default("POSTGRES_OS_IMAGE_VERSION", "alpine3. pgidkit_image_name := env_var_or_default("PGIDKIT_IMAGE_NAME", "ghcr.io/vadosware/pg_idkit") pgidkit_image_tag := env_var_or_default("POSGRES_IMAGE_VERSION", version + "-" + "pg" + pg_image_version + "-" + pg_os_image_version + "-" + container_img_arch) -pgidkit_image_name_full := env_var_or_default("PGIDKIT_IMAGE_NAME_FULL", pgidkit_image_name + ":" + pgidkit_image_tag) +pgidkit_image_tag_suffix := env_var_or_default("PGIDKIT_IMAGE_TAG_SUFFIX", "") +pgidkit_image_name_full := env_var_or_default("PGIDKIT_IMAGE_NAME_FULL", pgidkit_image_name + ":" + pgidkit_image_tag + pgidkit_image_tag_suffix) pgidkit_dockerfile_path := env_var_or_default("PGIDKIT_DOCKERFILE_PATH", "infra" / "docker" / pgidkit_image_tag + ".Dockerfile") docker_password_path := env_var_or_default("DOCKER_PASSWORD_PATH", "secrets/docker/password.secret") @@ -232,10 +233,6 @@ push-base-pkg-image: build-image: {{docker}} build {{docker_platform_arg}} {{docker_progress_arg}} -f {{img_dockerfile_path}} -t {{pgidkit_image_name_full}} --build-arg USER={{docker_build_user}} --build-arg PGIDKIT_REVISION={{revision}} --build-arg PGIDKIT_VERSION={{pgidkit_image_tag}} . -# Push the pre-release docker image for pg_idkit -push-image-prerelease: - {{docker}} push {{pgidkit_image_name_full}}-prerelease - # Push the docker image for pg_idkit push-image: {{docker}} push {{pgidkit_image_name_full}}