mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-20 19:19:56 +00:00
fix(ci): latest deps tests permissions (#3296)
* fix(ci): latest deps tests permissions * fix(ci): force push dep update branch * fix(ci): change secret for permissions & Ci trigger
This commit is contained in:
@@ -25,9 +25,6 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: "0 3 * * *"
|
- cron: "0 3 * * *"
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
# Sets up the environment variables
|
# Sets up the environment variables
|
||||||
env:
|
env:
|
||||||
UV_VERSION: "0.8.0"
|
UV_VERSION: "0.8.0"
|
||||||
@@ -46,6 +43,8 @@ jobs:
|
|||||||
name: Upgrade Lockfile
|
name: Upgrade Lockfile
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository == 'huggingface/lerobot'
|
if: github.repository == 'huggingface/lerobot'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
outputs:
|
outputs:
|
||||||
changed: ${{ steps.diff.outputs.changed }}
|
changed: ${{ steps.diff.outputs.changed }}
|
||||||
steps:
|
steps:
|
||||||
@@ -86,6 +85,8 @@ jobs:
|
|||||||
needs: [upgrade-lock]
|
needs: [upgrade-lock]
|
||||||
if: needs.upgrade-lock.outputs.changed == 'true'
|
if: needs.upgrade-lock.outputs.changed == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
env:
|
env:
|
||||||
MUJOCO_GL: egl
|
MUJOCO_GL: egl
|
||||||
HF_HOME: /mnt/cache/.cache/huggingface
|
HF_HOME: /mnt/cache/.cache/huggingface
|
||||||
@@ -140,6 +141,8 @@ jobs:
|
|||||||
name: Build and Push Docker
|
name: Build and Push Docker
|
||||||
needs: [upgrade-lock]
|
needs: [upgrade-lock]
|
||||||
if: needs.upgrade-lock.outputs.changed == 'true'
|
if: needs.upgrade-lock.outputs.changed == 'true'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
runs-on:
|
runs-on:
|
||||||
group: aws-general-8-plus
|
group: aws-general-8-plus
|
||||||
outputs:
|
outputs:
|
||||||
@@ -181,6 +184,8 @@ jobs:
|
|||||||
gpu-tests:
|
gpu-tests:
|
||||||
name: GPU Tests (Latest Deps)
|
name: GPU Tests (Latest Deps)
|
||||||
needs: [build-and-push-docker]
|
needs: [build-and-push-docker]
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
runs-on:
|
runs-on:
|
||||||
group: aws-g6-4xlarge-plus
|
group: aws-g6-4xlarge-plus
|
||||||
env:
|
env:
|
||||||
@@ -221,10 +226,8 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
# NOTE: PRs created with GITHUB_TOKEN won't trigger pull_request workflows.
|
|
||||||
# CI will run when a reviewer approves the PR (via pull_request_review trigger).
|
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.UPDATE_LOCK_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
@@ -247,7 +250,7 @@ jobs:
|
|||||||
git checkout -B "$BRANCH"
|
git checkout -B "$BRANCH"
|
||||||
git add uv.lock
|
git add uv.lock
|
||||||
git commit -m "chore(dependencies): update uv.lock"
|
git commit -m "chore(dependencies): update uv.lock"
|
||||||
git push --force-with-lease --set-upstream origin "$BRANCH"
|
git push --force origin "$BRANCH"
|
||||||
|
|
||||||
# Create PR only if one doesn't already exist for this branch
|
# Create PR only if one doesn't already exist for this branch
|
||||||
EXISTING_PR=$(gh pr list --head "$BRANCH" --state open --json number --jq '.[0].number')
|
EXISTING_PR=$(gh pr list --head "$BRANCH" --state open --json number --jq '.[0].number')
|
||||||
@@ -268,6 +271,8 @@ jobs:
|
|||||||
name: Cleanup Docker Image
|
name: Cleanup Docker Image
|
||||||
needs: [gpu-tests, build-and-push-docker]
|
needs: [gpu-tests, build-and-push-docker]
|
||||||
if: always() && needs.build-and-push-docker.result == 'success'
|
if: always() && needs.build-and-push-docker.result == 'success'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Get Docker Hub Token and Delete Image
|
- name: Get Docker Hub Token and Delete Image
|
||||||
|
|||||||
Reference in New Issue
Block a user