diff --git a/.github/workflows/build_images.yml b/.github/workflows/build_images.yml index ecb44333..9ab893a4 100644 --- a/.github/workflows/build_images.yml +++ b/.github/workflows/build_images.yml @@ -6,6 +6,11 @@ on: manifest_tag: description: 'Tag for the Docker manifest' required: false + skip_optional_images: + type: boolean + description: 'Skip building documentdb and gateway images' + required: false + default: false push: branches: @@ -53,8 +58,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - name: Login to GHCR + if: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.skip_optional_images == 'true' && (matrix.image.name == 'documentdb' || matrix.image.name == 'gateway')) }} run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Build and Push ${{ matrix.arch }} Image + if: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.skip_optional_images == 'true' && (matrix.image.name == 'documentdb' || matrix.image.name == 'gateway')) }} run: | TAG=${{ env.IMAGE_TAG }}-${{ matrix.arch }} docker build \ diff --git a/.github/workflows/release_images.yml b/.github/workflows/release_images.yml index e0a055cc..ff00fdd0 100644 --- a/.github/workflows/release_images.yml +++ b/.github/workflows/release_images.yml @@ -19,7 +19,7 @@ on: chart_version: description: 'Helm chart version to publish' required: false - default: '0.1.0' + default: '0.1.1' permissions: contents: read @@ -31,7 +31,7 @@ jobs: # Optional test jobs - run both E2E and integration tests in parallel if enabled test-e2e: name: E2E Test Images Before Release - if: ${{ inputs.run_tests == true }} + if: ${{ inputs.run_tests == 'true' }} uses: ./.github/workflows/test-E2E.yml with: image_tag: ${{ inputs.image_tag }} @@ -39,7 +39,7 @@ jobs: test-integration: name: Integration Test Images Before Release - if: ${{ inputs.run_tests == true }} + if: ${{ inputs.run_tests == 'true' }} uses: ./.github/workflows/test-integration.yml with: image_tag: ${{ inputs.image_tag }} @@ -105,11 +105,21 @@ jobs: run: | CHART_VERSION_INPUT="${{ github.event.inputs.chart_version }}" if [[ -z "$CHART_VERSION_INPUT" ]]; then - CHART_VERSION_INPUT="0.1.0" + CHART_VERSION_FROM_FILE=$(awk -F': *' '/^version:/ {print $2; exit}' documentdb-chart/Chart.yaml) + if [[ -z "$CHART_VERSION_FROM_FILE" ]]; then + echo "Failed to determine chart version from documentdb-chart/Chart.yaml" >&2 + exit 1 + fi + CHART_VERSION_INPUT="$CHART_VERSION_FROM_FILE" fi echo "CHART_VERSION=${CHART_VERSION_INPUT}" >> $GITHUB_ENV echo "Using chart version: ${CHART_VERSION_INPUT}" + - name: Update Chart.yaml metadata + run: | + sed -i "s/^version: .*/version: ${CHART_VERSION}/" documentdb-chart/Chart.yaml + sed -i "s/^appVersion: .*/appVersion: \"${CHART_VERSION}\"/" documentdb-chart/Chart.yaml + - name: Package Helm chart run: | helm dependency update operator/documentdb-helm-chart diff --git a/.gitignore b/.gitignore index b6f1d4e8..f53bd114 100644 --- a/.gitignore +++ b/.gitignore @@ -406,4 +406,4 @@ charts/ Chart.lock # Test output -*.out +*.out \ No newline at end of file diff --git a/docs/operator-public-documentation/index.md b/docs/operator-public-documentation/index.md index 23acf501..547c41a6 100644 --- a/docs/operator-public-documentation/index.md +++ b/docs/operator-public-documentation/index.md @@ -7,4 +7,4 @@
If you are not redirected automatically, follow this link to preview/index.md.
-