Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions .github/workflows/linux_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ on:
description: Identifies the Docker image by name.
default: "pytorch/conda-builder"
type: string
docker-build-dir:
description: |
The directory containing the build.sh shell script to build the docker image. The
path is relative to where the repo is checked out.
default: ".ci/docker"
type: string
gpu-arch-type:
description: "GPU arch type to use"
default: "cpu"
Expand Down Expand Up @@ -138,11 +144,6 @@ jobs:
with:
github-secret: ${{ github.token }}

- name: Pull docker image
uses: ./test-infra/.github/actions/pull-docker-image
with:
docker-image: ${{ env.DOCKER_IMAGE }}

- name: Checkout repository (${{ inputs.repository || github.repository }}@${{ inputs.ref }})
uses: actions/checkout@v3
with:
Expand All @@ -152,6 +153,20 @@ jobs:
path: ${{ inputs.repository || github.repository }}
fetch-depth: ${{ inputs.fetch-depth }}

- name: Calculate docker image
id: calculate-docker-image
uses: huydhn/test-infra/.github/actions/calculate-docker-image@calculate-docker-image
with:
docker-image-name: ${{ env.DOCKER_IMAGE }}
docker-build-dir: ${{ inputs.docker-build-dir }}
# This needs to be where the repository is checked out
working-directory: ${{ inputs.repository || github.repository }}

- name: Pull docker image
uses: ./test-infra/.github/actions/pull-docker-image
with:
docker-image: ${{ steps.calculate-docker-image.outputs.docker-image }}

- name: Download artifacts (if any)
uses: actions/download-artifact@v3
if: ${{ inputs.download-artifact != '' }}
Expand All @@ -172,6 +187,7 @@ jobs:
working-directory: ${{ inputs.repository }}
env:
ALL_SECRETS: ${{ toJSON(secrets) }}
DOCKER_IMAGE: ${{ steps.calculate-docker-image.outputs.docker-image }}
run: |
set -ex
{
Expand Down