Skip to content

Commit e15e842

Browse files
authored
Enhance PR workflow with Quay.io integration
Added steps to log in to Quay.io, run sanity checks, and push the Docker image. Signed-off-by: Dushyant Behl <dushyantbehl@users.noreply.github.com>
1 parent 09810e3 commit e15e842

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/pr-command.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,27 @@ jobs:
5454
- name: Build NVCR Image
5555
run: |
5656
docker build \
57-
-t fms-hf-tuning:pr-${{ github.event.issue.number }}-nvcr \
57+
-t ${{ vars.QUAY_REPOSITORY }}fms-hf-tuning:pr-${{ github.event.issue.number }}-nvcr \
5858
-f build/nvcr.Dockerfile .
5959
60+
- name: Login to Quay.io
61+
uses: docker/login-action@v3
62+
with:
63+
registry: quay.io
64+
username: ${{ secrets.QUAY_USERNAME }}
65+
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
66+
67+
- name: Run basic sanity checks/tests on the new image before pushing
68+
run: |
69+
echo 'check if accelerate is installed and in the PATH'
70+
IMAGE_NAME=${{ vars.QUAY_REPOSITORY }}fms-hf-tuning:main-nvcr-latest
71+
docker run --rm -it --entrypoint which "$IMAGE_NAME" accelerate
72+
echo 'checks done'
73+
74+
- name: Push docker image
75+
run: |
76+
docker push ${{ vars.QUAY_REPOSITORY }}fms-hf-tuning:pr-${{ github.event.issue.number }}-nvcr
77+
6078
- name: Comment build result
6179
if: always()
6280
uses: actions/github-script@v7

0 commit comments

Comments
 (0)