Skip to content

Commit

Permalink
ci: Run on merge commit (NVIDIA#355)
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Koenig <[email protected]>
Signed-off-by: Walter Teng <[email protected]>
  • Loading branch information
ko3n1g authored and davzoku committed Nov 19, 2024
1 parent 44bbdaf commit aa31da6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gpuci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
image-label: nemo-curator
build-args: |
IMAGE_LABEL=nemo-curator
FORKED_REPO_URL=https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git
CURATOR_COMMIT=${{ github.event.pull_request.head.sha || github.sha }}
REPO_URL=https://github.com/${{ github.repository }}.git
CURATOR_COMMIT=${{ github.sha }}
prune-filter-timerange: 24h

# Then, we run our PyTests in the container we just built
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ ARG CUDA_VER=12.5.1
ARG LINUX_VER=ubuntu22.04
ARG PYTHON_VER=3.10
ARG IMAGE_LABEL
ARG FORKED_REPO_URL
ARG REPO_URL
ARG CURATOR_COMMIT

FROM rapidsai/ci-conda:cuda${CUDA_VER}-${LINUX_VER}-py${PYTHON_VER} as curator-update
# Needed to navigate to and pull the forked repository's changes
ARG FORKED_REPO_URL
ARG REPO_URL
ARG CURATOR_COMMIT

# Clone the user's repository, find the relevant commit, and install everything we need
RUN bash -exu <<EOF
mkdir -p /opt/NeMo-Curator
cd /opt/NeMo-Curator
git init
git remote add origin $FORKED_REPO_URL
git remote add origin $REPO_URL
git fetch origin '+refs/pull/*/merge:refs/remotes/pull/*/merge'
git checkout $CURATOR_COMMIT
EOF
Expand Down

0 comments on commit aa31da6

Please sign in to comment.