diff --git a/.ci/pull_fluent_image.sh b/.ci/pull_fluent_image.sh index 5a2f1382634..8855e2feb6d 100644 --- a/.ci/pull_fluent_image.sh +++ b/.ci/pull_fluent_image.sh @@ -1,7 +1,14 @@ #!/bin/sh # Image name -_IMAGE_NAME="ghcr.io/ansys/pyfluent:${FLUENT_IMAGE_TAG:-latest}" +SHA='sha256' +SUBSTRING=$(echo ${FLUENT_IMAGE_TAG}| cut -c 1-6) +if [ "$SUBSTRING" == "$SHA" ] +then + _IMAGE_NAME="ghcr.io/ansys/pyfluent@${FLUENT_IMAGE_TAG}" +else + _IMAGE_NAME="ghcr.io/ansys/pyfluent:${FLUENT_IMAGE_TAG:-latest}" +fi # Pull fluent image based on tag docker pull $_IMAGE_NAME diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01db8b84c60..c4c1e67cabc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -447,7 +447,7 @@ jobs: if: steps.cache-251-api-code.outputs.cache-hit != 'true' run: make docker-pull env: - FLUENT_IMAGE_TAG: v25.1.0 + FLUENT_IMAGE_TAG: ${{ vars.FLUENT_STABLE_IMAGE_DEV }} - name: Run 25.1 API codegen if: steps.cache-251-api-code.outputs.cache-hit != 'true' @@ -539,11 +539,17 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Pull Fluent docker image - if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }} + if: ${{ matrix.image-tag != 'v25.1.0' && !contains(github.event.pull_request.title, '[skip tests]') }} run: make docker-pull env: FLUENT_IMAGE_TAG: ${{ matrix.image-tag }} + - name: Pull Fluent docker image dev + if: ${{ matrix.image-tag == 'v25.1.0' && !contains(github.event.pull_request.title, '[skip tests]') }} + run: make docker-pull + env: + FLUENT_IMAGE_TAG: ${{ vars.FLUENT_STABLE_IMAGE_DEV }} + - name: Unit Testing if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }} run: | diff --git a/.github/workflows/test-run-custom.yml b/.github/workflows/test-run-custom.yml index 1c861d1fba2..232abe86094 100644 --- a/.github/workflows/test-run-custom.yml +++ b/.github/workflows/test-run-custom.yml @@ -75,10 +75,17 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Pull Fluent docker image + if: matrix.image-tag != 'v25.1.0' run: make docker-pull env: FLUENT_IMAGE_TAG: ${{ matrix.image-tag }} + - name: Pull Fluent docker image dev + if: matrix.image-tag == 'v25.1.0' + run: make docker-pull + env: + FLUENT_IMAGE_TAG: ${{ vars.FLUENT_STABLE_IMAGE_DEV }} + - name: Run API codegen run: make api-codegen env: diff --git a/.github/workflows/test-run-dev-version-nightly.yml b/.github/workflows/test-run-dev-version-nightly.yml index 58608259e1f..be0e35af658 100644 --- a/.github/workflows/test-run-dev-version-nightly.yml +++ b/.github/workflows/test-run-dev-version-nightly.yml @@ -81,3 +81,10 @@ jobs: env: FLUENT_IMAGE_TAG: v25.1.0 + - name: Update Fluent image + env: + GITHUB_TOKEN: ${{ secrets.ADMIN_ACCESS_TOKEN }} + run: | + DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ghcr.io/ansys/pyfluent:v25.1.0 | sed 's/.*@//') + gh variable set FLUENT_STABLE_IMAGE_DEV --body $DIGEST + diff --git a/.github/workflows/test-run-solvermode-weekly.yml b/.github/workflows/test-run-solvermode-weekly.yml index d6ad49e7128..3870336290a 100644 --- a/.github/workflows/test-run-solvermode-weekly.yml +++ b/.github/workflows/test-run-solvermode-weekly.yml @@ -57,6 +57,8 @@ jobs: - name: Pull 25.1 Fluent docker image run: make docker-pull + env: + FLUENT_IMAGE_TAG: ${{ vars.FLUENT_STABLE_IMAGE_DEV }} - name: Run 25.1 API codegen run: make api-codegen