diff --git a/.github/workflows/build-and-stage.yml b/.github/workflows/build-and-stage.yml index ce49d45d..c8f20256 100644 --- a/.github/workflows/build-and-stage.yml +++ b/.github/workflows/build-and-stage.yml @@ -47,15 +47,15 @@ jobs: - name: Declare image versions id: version run: | - if '${{ steps.filter.outputs.docfx-layer-changed }}' = 'true' + if '${{ steps.filter.outputs.docfx-layer-changed }}' == 'true' then - echo "docfx-image-version=${{ github.event_name == 'pull_request' && format('{0}-pr{1}', env.DOCFX_VERSION, github.event.number) || env.DOCFX_VERSION }}" >> "$GITHUB_OUTPUT" + echo "docfx-image-version=${{ github.event_name == 'pull_request' && github.run_id || env.DOCFX_VERSION }}" >> "$GITHUB_OUTPUT" else echo "docfx-image-version=${{ env.DOCFX_VERSION }}" >> "$GITHUB_OUTPUT" fi - if '${{ steps.filter.outputs.metadata-layer-changed }}' = 'true' + if '${{ steps.filter.outputs.metadata-layer-changed }}' == 'true' then - echo "metadata-image-version=${{ github.event_name == 'pull_request' && format('{0}-pr{1}', env.STEELTOE_VERSIONS, github.event.number) || env.STEELTOE_VERSIONS }}" >> "$GITHUB_OUTPUT" + echo "metadata-image-version=${{ github.event_name == 'pull_request' && github.run_id || env.STEELTOE_VERSIONS }}" >> "$GITHUB_OUTPUT" else echo "metadata-image-version=${{ env.STEELTOE_VERSIONS }}" >> "$GITHUB_OUTPUT" fi diff --git a/Dockerfile b/Dockerfile index 2d087ef1..caad36cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -ARG METADATA_IMAGE_VERSION=2.5.5-3.2.6 +# example --build-arg="METADATA_IMAGE_VERSION=2.5.5-3.2.6" +ARG METADATA_IMAGE_VERSION FROM steeltoe.azurecr.io/documentation-metadata:${METADATA_IMAGE_VERSION} AS build WORKDIR /docs COPY . . diff --git a/Dockerfile-metadata b/Dockerfile-metadata index 15d7db45..870d64c4 100644 --- a/Dockerfile-metadata +++ b/Dockerfile-metadata @@ -1,4 +1,5 @@ -ARG DOCFX_IMAGE_VERSION=2.59.4 +# example --build-arg="DOCFX_IMAGE_VERSION=2.59.4" +ARG DOCFX_IMAGE_VERSION FROM steeltoe.azurecr.io/docfx:${DOCFX_IMAGE_VERSION} WORKDIR /docs COPY . . diff --git a/build-metadata.sh b/build-metadata.sh index d39b56a8..8282f774 100644 --- a/build-metadata.sh +++ b/build-metadata.sh @@ -16,7 +16,7 @@ get_sources() { local branch=$2 echo "$(basename $dest_dir) sources from $branch" [ -d $dest_dir ] && rm -rf $dest_dir - git clone $git_sources_url $dest_dir -b $branch + git clone $git_sources_url $dest_dir -b $branch --depth 1 } get_sources sources/v2 $v2_sources diff --git a/metadata.conf b/metadata.conf index 949c3128..6779eab7 100644 --- a/metadata.conf +++ b/metadata.conf @@ -1,2 +1,2 @@ -2:release/2.5 -3:release/3.2 +2:2.5.5 +3:3.2.6