Skip to content

docker-release-builds #1073

docker-release-builds

docker-release-builds #1073

name: docker-release-builds
on:
schedule:
# Push the nightly docker daily at 1 PM UTC
- cron: '0 13 * * *'
# Trigger when we modify something related to these images
pull_request:
paths:
- .github/scripts/build_publish_nightly_docker.sh
- .github/workflows/push_nightly_docker_ghcr.yml
- Dockerfile
- docker.Makefile
# Have the ability to trigger this job manually using the API as well
workflow_dispatch:
jobs:
docker-release-build:
if: ${{ github.repository == 'pytorch/pytorch' }}
runs-on: linux.2xlarge
env:
GHCR_PAT: ${{ secrets.GHCR_PAT }}
WITH_PUSH: ${{ github.event_name == 'schedule' }}
steps:
- name: Checkout PyTorch
uses: zhouzhuojie/checkout@05b13c9a0d21f08f6d5e64a1d5042246d13619d9
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
- uses: nick-fields/retry@71062288b76e2b6214ebde0e673ce0de1755740a
name: Build and upload nightly docker
with:
timeout_minutes: 10
max_attempts: 3
command: |
set -ex
bash .github/scripts/build_publish_nightly_docker.sh
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true