Skip to content

Replace viser viewer internals with mjviser (#853) #353

Replace viser viewer internals with mjviser (#853)

Replace viser viewer internals with mjviser (#853) #353

Workflow file for this run

name: Docker
on:
workflow_dispatch:
push:
branches:
- "main"
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
concurrency:
group: docker-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
FORCE_COLOR: 1
REGISTRY: ghcr.io
IMAGE_NAME: mujocolab/mjlab
permissions:
id-token: write
packages: write
jobs:
check_paths:
runs-on: ubuntu-22.04
outputs:
build: ${{ steps.filter.outputs.any }}
steps:
- uses: actions/checkout@v6
- id: filter
uses: dorny/paths-filter@v3
with:
list-files: shell
filters: |
any:
- ".github/workflows/docker.yml"
- "Dockerfile"
build:
needs: check_paths
if: ${{ needs.check_paths.outputs.build == 'true' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Log into registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: |
type=gha
type=registry,ref=ghcr.io/mujocolab/mjlab/mjlab:buildcache
cache-to: |
type=gha,mode=max
type=registry,ref=ghcr.io/mujocolab/mjlab/mjlab:buildcache,mode=max
platforms: linux/amd64