diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 747c7290b..d7d96e721 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -26,8 +26,13 @@ on: jobs: main: runs-on: windows-2019 + env: + # DockerHub base image name. May switch to GitHub Docker Packages + # in the future. See GitHub Issue #789 and PR #830 + BASE_IMAGE_NAME: "nerdvegas/rez-win-py:${{ matrix.python-version }}" strategy: + matrix: # Needs to match python version of images (see windows-docker-image.yaml) python-version: @@ -37,18 +42,14 @@ jobs: fail-fast: false steps: + - name: Checkout uses: actions/checkout@v1 - - name: Pull docker image - run: | - ${gh_user} = ("${{ github.repository }}" -Split '/')[0] - ${Env:LAST_DOCKER_REVISION} = $( git log -n 1 --author-date-order --pretty=format:%H -- .\.github\docker\rez-win-py\ .\.github\docker\rez-win-base\ .\.github\workflows\windows-docker-image.yaml ).SubString(0, 8) - echo "Pulling rez-win-py:${{ matrix.python-version }}-${Env:LAST_DOCKER_REVISION}" - docker pull ${gh_user}/rez-win-py:${{ matrix.python-version }}-${Env:LAST_DOCKER_REVISION} - - name: Run Docker image (installs and tests rez) run: | - ${gh_user} = ("${{ github.repository }}" -Split '/')[0] ${Env:LAST_DOCKER_REVISION} = $( git log -n 1 --author-date-order --pretty=format:%H -- .\.github\docker\rez-win-py\ .\.github\docker\rez-win-base\ .\.github\workflows\windows-docker-image.yaml ).SubString(0, 8) - docker run --mount type=bind,src=$pwd,dst=C:\checkout,readonly ${gh_user}/rez-win-py:${{ matrix.python-version }}-${Env:LAST_DOCKER_REVISION} + ${docker_image} = "${{ Env.BASE_IMAGE_NAME }}-${Env:LAST_DOCKER_REVISION}" + + Write-Output "Running DockerHub ${docker_image}..." + docker run --mount type=bind,src=$pwd,dst=C:\checkout,readonly ${docker_image}