chore(ci): skip workflows if not lerobot repository (#2601)

Co-authored-by: Alex Tyshka <atyshka15@gmail.com>
This commit is contained in:
Steven Palma
2025-12-08 12:44:36 +01:00
committed by GitHub
parent 0217e1e3ad
commit f9cb5e659c
7 changed files with 11 additions and 4 deletions
@@ -31,7 +31,8 @@ jobs:
name: Upload Preview and Comment name: Upload Preview and Comment
if: > if: >
github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' github.event.workflow_run.conclusion == 'success' &&
github.repository == 'huggingface/lerobot'
uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main
with: with:
package_name: lerobot package_name: lerobot
+4 -2
View File
@@ -42,7 +42,9 @@ jobs:
# This job builds and deploys the official documentation. # This job builds and deploys the official documentation.
build_main_docs: build_main_docs:
name: Build Main Docs name: Build Main Docs
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' if: >
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
github.repository == 'huggingface/lerobot'
permissions: permissions:
contents: read contents: read
uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main
@@ -58,7 +60,7 @@ jobs:
# The result of this job triggers the 'Upload PR Documentation' workflow. # The result of this job triggers the 'Upload PR Documentation' workflow.
build_pr_docs: build_pr_docs:
name: Build PR Docs name: Build PR Docs
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request' && github.repository == 'huggingface/lerobot'
permissions: permissions:
contents: read contents: read
pull-requests: write pull-requests: write
-1
View File
@@ -45,7 +45,6 @@ permissions:
env: env:
UV_VERSION: "0.8.0" UV_VERSION: "0.8.0"
PYTHON_VERSION: "3.10" PYTHON_VERSION: "3.10"
DOCKER_IMAGE_NAME: huggingface/lerobot-gpu
# Ensures that only the latest commit for a PR or branch is built, canceling older runs. # Ensures that only the latest commit for a PR or branch is built, canceling older runs.
concurrency: concurrency:
+2
View File
@@ -43,6 +43,7 @@ jobs:
name: Build CPU Docker for Nightly name: Build CPU Docker for Nightly
runs-on: runs-on:
group: aws-general-8-plus group: aws-general-8-plus
if: github.repository == 'huggingface/lerobot'
outputs: outputs:
image_tag: ${{ env.DOCKER_IMAGE_NAME_CPU }} image_tag: ${{ env.DOCKER_IMAGE_NAME_CPU }}
steps: steps:
@@ -77,6 +78,7 @@ jobs:
name: Build GPU Docker for Nightly name: Build GPU Docker for Nightly
runs-on: runs-on:
group: aws-general-8-plus group: aws-general-8-plus
if: github.repository == 'huggingface/lerobot'
outputs: outputs:
image_tag: ${{ env.DOCKER_IMAGE_NAME_GPU }} image_tag: ${{ env.DOCKER_IMAGE_NAME_GPU }}
steps: steps:
+1
View File
@@ -29,6 +29,7 @@ jobs:
build-and-publish: build-and-publish:
name: Build and publish Python distributions name: Build and publish Python distributions
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'huggingface/lerobot'
outputs: outputs:
version: ${{ steps.extract_info.outputs.tag_version }} version: ${{ steps.extract_info.outputs.tag_version }}
permissions: permissions:
+1
View File
@@ -45,6 +45,7 @@ jobs:
stale: stale:
name: Close Stale Issues and PRs name: Close Stale Issues and PRs
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'huggingface/lerobot'
permissions: permissions:
actions: write actions: write
contents: write # only for delete-branch option contents: write # only for delete-branch option
+1
View File
@@ -43,6 +43,7 @@ jobs:
full-tests: full-tests:
name: Full Unbound Tests name: Full Unbound Tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'huggingface/lerobot'
env: env:
MUJOCO_GL: egl MUJOCO_GL: egl
HF_HOME: /mnt/cache/.cache/huggingface HF_HOME: /mnt/cache/.cache/huggingface