Skip to content

Commit 5dd0f59

Browse files
committed
change the image build and push workflows for various branches
Signed-off-by: Dushyant Behl <[email protected]>
1 parent 3975a63 commit 5dd0f59

File tree

4 files changed

+55
-9
lines changed

4 files changed

+55
-9
lines changed

.github/workflows/dev-image.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: dev-image
22
on:
33
push:
44
branches: [ "staging" ]
5-
pull_request:
6-
branches: [ "staging" ]
75

86
jobs:
97
build:
@@ -14,4 +12,13 @@ jobs:
1412
uses: ./.github/actions/free-up-disk-space
1513
- name: Build image
1614
run: |
17-
docker build -t fms-hf-tuning:dev . -f build/nvcr.Dockerfile
15+
docker build -t fms-hf-tuning-staging:latest . -f build/nvcr.Dockerfile
16+
- name: Login to Quay.io
17+
uses: docker/login-action@v3
18+
with:
19+
registry: quay.io
20+
username: ${{ secrets.QUAY_USERNAME }}
21+
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
22+
- name: Push docker image to Quay.io
23+
run: |
24+
docker push ${{ env.QUAY_REPOSITORY }}/fms-hf-tuning-staging:latest

.github/workflows/format.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ name: Format
1616

1717
on:
1818
push:
19-
branches: [ "main", "release" ]
19+
branches: [ "main", "release", "staging" ]
2020
pull_request:
21-
branches: [ "main", "release" ]
21+
branches: [ "main", "release", "staging" ]
2222

2323
jobs:
2424
lint:

.github/workflows/image.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Image
22
on:
33
push:
4-
branches: [ "main", "release" ]
4+
branches: [ "main" ]
55
pull_request:
6-
branches: [ "main", "release" ]
6+
branches: [ "main" ]
77

88
jobs:
99
build:
@@ -12,6 +12,17 @@ jobs:
1212
- uses: actions/checkout@v4
1313
- name: "Free up disk space"
1414
uses: ./.github/actions/free-up-disk-space
15-
- name: Build image
15+
- name: Build NVCR dev Image
1616
run: |
17-
docker build -t fms-hf-tuning:dev . -f build/Dockerfile
17+
docker build -t fms-hf-tuning-dev:latest . -f build/nvcr.Dockerfile
18+
- name: Login to Quay.io
19+
if: github.event_name == 'push'
20+
uses: docker/login-action@v3
21+
with:
22+
registry: quay.io
23+
username: ${{ secrets.QUAY_USERNAME }}
24+
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
25+
- name: Push docker image for every commit to Quay.io as dev images
26+
if: github.event_name == 'push'
27+
run: |
28+
docker push ${{ env.QUAY_REPOSITORY }}/fms-hf-tuning-dev:latest
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Image
2+
on:
3+
push:
4+
branches: [ "release" ]
5+
pull_request:
6+
branches: [ "release" ]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: "Free up disk space"
14+
uses: ./.github/actions/free-up-disk-space
15+
- name: Build UBI9 Prod Image
16+
run: |
17+
docker build -t fms-hf-tuning:latest . -f build/Dockerfile
18+
- name: Login to Quay.io
19+
if: github.event_name == 'push'
20+
uses: docker/login-action@v3
21+
with:
22+
registry: quay.io
23+
username: ${{ secrets.QUAY_USERNAME }}
24+
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
25+
- name: Push docker image to Quay.io
26+
if: github.event_name == 'push'
27+
run: |
28+
docker push ${{ env.QUAY_REPOSITORY }}/fms-hf-tuning:latest

0 commit comments

Comments
 (0)