diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 4b35a72..9149499 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -22,6 +22,8 @@ jobs: liquibaseVersion: ${{ steps.collect-data.outputs.liquibaseVersion }} extensionVersion: ${{ steps.collect-data.outputs.extensionVersion }} minorVersion: ${{ steps.collect-data.outputs.minorVersion }} + latestCommitSha: ${{ steps.get-latest-sha.outputs.latestCommitSha }} + steps: - name: Collect Data id: collect-data @@ -93,6 +95,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + - name: Get latest commit SHA + id: get-latest-sha + run: echo "latestCommitSha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" + setup-update-draft-build: name: "${{ matrix.image.name }}:${{ inputs.liquibaseVersion}}${{ matrix.image.suffix }}" needs: update-dockerfiles @@ -184,12 +190,12 @@ jobs: echo "" >> library/liquibase echo "Tags: ${{ env.MAJOR_MINOR }}, ${{ needs.update-dockerfiles.outputs.liquibaseVersion }}, latest" >> library/liquibase echo "GitFetch: refs/heads/main" >> library/liquibase - echo "GitCommit: ${{ github.sha }}" >> library/liquibase + echo "GitCommit: ${{ needs.update-dockerfiles.outputs.latestCommitSha }}" >> library/liquibase echo "File: Dockerfile" >> library/liquibase echo "" >> library/liquibase echo "Tags: ${{ env.MAJOR_MINOR }}-alpine, ${{ needs.update-dockerfiles.outputs.liquibaseVersion }}-alpine, alpine" >> library/liquibase echo "GitFetch: refs/heads/main" >> library/liquibase - echo "GitCommit: ${{ github.sha }}" >> library/liquibase + echo "GitCommit: ${{ needs.update-dockerfiles.outputs.latestCommitSha }}" >> library/liquibase echo "File: Dockerfile.alpine" >> library/liquibase git add library/liquibase if git diff-index --cached --quiet HEAD -- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1cd438c..4f223e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: run: | LOG_STRING="The database does not persist data" docker run --name $CONTAINER_NAME -d -v $(pwd)/.github/test:/liquibase/changelog liquibase/liquibase:${{ github.sha }} init start-h2 - sleep 20 + sleep 30 # Check if the container is running if docker inspect -f '{{.State.Running}}' "$CONTAINER_NAME" 2>/dev/null | grep -q "true"; then # Get the logs and check if the desired string is present @@ -118,7 +118,7 @@ jobs: docker rm $CONTAINER_NAME # Start docker container with good ENV docker run --name $CONTAINER_NAME -d -v $(pwd)/.github/test:/liquibase/changelog -e LIQUIBASE_HOME="/liquibase" liquibase/liquibase:${{ github.sha }} init start-h2 - sleep 20 + sleep 30 docker logs $CONTAINER_NAME # Check if the container is running if docker inspect -f '{{.State.Running}}' "$CONTAINER_NAME" 2>/dev/null | grep -q "true"; then @@ -141,7 +141,7 @@ jobs: docker stop $CONTAINER_NAME # Start docker container docker start $CONTAINER_NAME - sleep 5 + sleep 30 # Check if the container is running if docker inspect -f '{{.State.Running}}' "$CONTAINER_NAME" 2>/dev/null | grep -q "true"; then # Get the logs and check if the desired string is present diff --git a/Dockerfile b/Dockerfile index 6518f5c..abf266f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,8 @@ RUN groupadd --gid 1001 liquibase && \ # Download and install Liquibase WORKDIR /liquibase -ARG LIQUIBASE_VERSION=4.29.0 -ARG LB_SHA256=0883b4975fc2f0a2f0180614cb156cea3c453057e6ec185c01550ec67030d8d0 +ARG LIQUIBASE_VERSION=4.29.1 +ARG LB_SHA256=30524ff1c1be1aac46b774bcc7e2d5488eb217c174e9ff82f0bac244feb9b117 RUN wget -q -O liquibase-${LIQUIBASE_VERSION}.tar.gz "https://github.com/liquibase/liquibase/releases/download/v${LIQUIBASE_VERSION}/liquibase-${LIQUIBASE_VERSION}.tar.gz" && \ echo "$LB_SHA256 *liquibase-${LIQUIBASE_VERSION}.tar.gz" | sha256sum -c - && \ diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 1b38a7e..95de4e2 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -11,8 +11,8 @@ RUN apk add --no-cache openjdk17-jre-headless bash WORKDIR /liquibase -ARG LIQUIBASE_VERSION=4.29.0 -ARG LB_SHA256=0883b4975fc2f0a2f0180614cb156cea3c453057e6ec185c01550ec67030d8d0 +ARG LIQUIBASE_VERSION=4.29.1 +ARG LB_SHA256=30524ff1c1be1aac46b774bcc7e2d5488eb217c174e9ff82f0bac244feb9b117 # Download, verify, extract RUN set -x && \