forked from NVIDIA/dcgm-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.4 KB
/
build_push_docker.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
44
45
46
47
48
49
50
51
52
53
# Build and push docker image contained in docker/ directory
name: Build and Push Docker Images
on:
push:
branches:
- flexai/deploy
paths:
- "pkg/**"
- "docker/**"
- ".github/workflows/build_push_docker.yml"
jobs:
build_and_push:
runs-on: ubuntu-latest
environment: prod
env:
GOLANG_VERSION: 1.22.5
DCGM_VERSION: 3.3.9
DCGM_EXPORTER_VERSION: 3.6.1
SCW_INFRA_REGISTRY_URL: rg.fr-par.scw.cloud/flexai-infra
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: NOLOGIN
password: ${{ secrets.SCW_REGISTRY_INFRA_RW_SECRET }}
registry: ${{ env.SCW_INFRA_REGISTRY_URL }}
- name: Build and Push Docker Images
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile.ubuntu22.04
platforms: linux/amd64
build-args: |
GOLANG_VERSION=${{ env.GOLANG_VERSION }}
DCGM_VERSION=${{ env.DCGM_VERSION }}
VERSION=${{ env.DCGM_EXPORTER_VERSION }}
push: true
tags: |
${{ env.SCW_INFRA_REGISTRY_URL }}/dcgm-exporter:${{ github.sha }}
${{ env.SCW_INFRA_REGISTRY_URL }}/dcgm-exporter:latest