-
Notifications
You must be signed in to change notification settings - Fork 510
43 lines (35 loc) · 1.19 KB
/
ngc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: NGC Build & Push
on:
push:
branches:
- main
jobs:
dockerhub:
name: NGC
runs-on:
group: 'aws-general-8-plus'
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to NGC
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
registry: nvcr.io
username: ${{ secrets.NVCR_USERNAME }}
password: ${{ secrets.NVCR_PASSWORD }}
- 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: |
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:${{ env.SHA }}
docker push nvcr.io/ycymhzotssoi/autotrain-advanced:latest
docker push nvcr.io/ycymhzotssoi/autotrain-advanced:${{ env.SHA }}