Skip to content

Fix docker login

Fix docker login #4

# Build and push docker image contained in docker/ directory
name: Build and Push Docker Images
on:
push:
branches:
- flexai/deploy
- fix-docker-login
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: docker/
# 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