Skip to content

Commit

Permalink
update wf
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekkrthakur committed Mar 14, 2024
1 parent 20d7be6 commit 23bf606
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/build_and_push_ngc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,21 @@ jobs:
username: ${{ secrets.NVCR_USERNAME }}
password: ${{ secrets.NVCR_PASSWORD }}

- name: GitHub SHA
run: echo "GitHub SHA: $GITHUB_SHA"
- name: Set short git commit SHA
id: vars
run: |
sha=$(git rev-parse --short ${{ github.sha }})
echo "SHA=$sha" >> $GITHUB_ENV
- name: SHA
run: echo ${{ env.SHA }}


- name: Build and Push NGC Image
run: |
SHA=$(echo $GITHUB_SHA | cut -c1-7)
docker build -t autotrain-advanced:latest .
docker tag autotrain-advanced:latest nvcr.io/ycymhzotssoi/autotrain-advanced:latest
docker tag autotrain-advanced:latest nvcr.io/ycymhzotssoi/autotrain-advanced:$SHA
docker tag autotrain-advanced:latest nvcr.io/ycymhzotssoi/autotrain-advanced:${{ env.SHA }}
docker push nvcr.io/ycymhzotssoi/autotrain-advanced:latest
docker push nvcr.io/ycymhzotssoi/autotrain-advanced:$SHA
docker push nvcr.io/ycymhzotssoi/autotrain-advanced:${{ env.SHA }}

0 comments on commit 23bf606

Please sign in to comment.