Skip to content

Add unit tests for profiler module (#266) #140

Add unit tests for profiler module (#266)

Add unit tests for profiler module (#266) #140

name: 🐳 Publish Docker Images on GHCR
on:
push:
branches:
- master
workflow_dispatch:
inputs:
user_uid:
description: 'User UID'
required: true
default: '1000'
user_gid:
description: 'Group GID'
required: true
default: '1000'
jobs:
publish-student-image:
if: github.event_name == 'workflow_dispatch' && (inputs.user_uid != '1000' || inputs.user_gid != '1000')
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=student-uid${{ inputs.user_uid }}-gid${{ inputs.user_gid }}-gpu
- name: Build & push student GPU image for RCP
uses: docker/build-push-action@v6
with:
context: .
file: docker/ubuntu/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
DEVICE=gpu
USER_UID=${{ inputs.user_uid }}
USER_GID=${{ inputs.user_gid }}
cache-from: type=gha
cache-to: type=gha,mode=max
publish-github-container:
if: github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
device: [cpu, gpu]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}},suffix=-${{ matrix.device }}
type=edge,suffix=-${{ matrix.device }}
type=sha,suffix=-${{ matrix.device }}
- name: Build & push ${{ matrix.device }} image
uses: docker/build-push-action@v6
with:
context: .
file: docker/ubuntu/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
DEVICE=${{ matrix.device }}
cache-from: type=gha
cache-to: type=gha,mode=max