/
githubmirror
/
yolov5
Обзор
Документация
Войти
/
githubmirror
/
yolov5
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
.github/workflows/docker.yml
77 строк
3 KB
dependabot[bot]
Bump actions/checkout from 6 to 7 in /.github/workflows (#13797)
19 июн 2026, 10:51
Не верифицирован
19 июн 2026, 10:51
59fd578
Код
Авторство
О чём код?
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license # Builds ultralytics/yolov5:latest images on DockerHub https://hub.docker.com/r/ultralytics/yolov5 name: Publish Docker Images permissions: contents: read # Required for checkout only; Docker Hub push uses repository secrets. on: push: branches: [master] workflow_dispatch: jobs: docker: if: github.repository == 'ultralytics/yolov5' name: Build ${{ matrix.tag }} strategy: fail-fast: false matrix: include: - dockerfile: utils/docker/Dockerfile-arm64 tag: latest-arm64 platform: linux/arm64 runs_on: ubuntu-24.04-arm - dockerfile: utils/docker/Dockerfile-cpu tag: latest-cpu platform: linux/amd64 runs_on: ubuntu-latest - dockerfile: utils/docker/Dockerfile tag: latest platform: linux/amd64 runs_on: ubuntu-latest runs-on: ${{ matrix.runs_on }} steps: - name: Checkout repo uses: actions/checkout@v7 with: fetch-depth: 0 # copy full .git directory to access full git history in Docker images - name: Login to Docker Hub uses: ultralytics/actions/retry@main env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} with: run: | if ! out=$(printf '%s' "$DOCKERHUB_TOKEN" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin 2>&1); then printf '%s\n' "$out" >&2 exit 1 fi echo "Logged in to docker.io" - name: Build Docker image uses: ultralytics/actions/retry@main with: timeout_minutes: 120 retry_delay_seconds: 60 retries: 2 run: | docker build \ --platform ${{ matrix.platform }} \ --label "org.opencontainers.image.source=https://github.com/ultralytics/yolov5" \ --label "org.opencontainers.image.description=Ultralytics YOLOv5 image" \ --label "org.opencontainers.image.licenses=AGPL-3.0-or-later" \ -f ${{ matrix.dockerfile }} \ -t ultralytics/yolov5:${{ matrix.tag }} \ . - name: Push Docker image uses: ultralytics/actions/retry@main with: timeout_minutes: 15 retry_delay_seconds: 300 retries: 2 run: docker push ultralytics/yolov5:${{ matrix.tag }}