-
Notifications
You must be signed in to change notification settings - Fork 66
42 lines (41 loc) · 1.25 KB
/
staging-image.yaml
File metadata and controls
42 lines (41 loc) · 1.25 KB
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
name: dev-image
on:
push:
tags:
- 'v*.*.*'
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Free up disk space"
uses: ./.github/actions/free-up-disk-space
- name: Determine image tag
id: tag
run: |
if [ "${{ github.event_name }}" = "release" ]; then
TAG="${{ github.event.release.tag_name }}"
elif [ "${{ github.ref_type }}" = "tag" ]; then
TAG="${GITHUB_REF_NAME}"
else
TAG="dev"
fi
echo "IMAGE_TAG=$TAG" >> $GITHUB_ENV
- name: Build image
run: |
docker build \
-t fms-hf-tuning:${IMAGE_TAG}-nvcr \
-t fms-hf-tuning:staging-nvcr-latest \
-f build/nvcr.Dockerfile .
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- name: Push docker image to Quay.io
run: |
docker push ${{ env.QUAY_REPOSITORY }}/fms-hf-tuning:staging-nvcr-latest
docker push ${{ env.QUAY_REPOSITORY }}/fms-hf-tuning:${IMAGE_TAG}-nvcr