Skip to content

Commit ad1b679

Browse files
committed
Reland "Rebuild docker images on release builds"
This is a reland of #1451 with an important to branches filter: entries in multi-line array definition should start with `-` otherwise it were attempting to match branch name `main\nrelease/*` I.e. just copy-n-paste example from https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#using-filters Test plan: actionlint .github/workflows/build-manywheel-images.yml Original PR description: Rebuild docker images on release builds. It should also tag images for release here: https://github.com/pytorch/builder/blob/3fc310ac21c9ede8d0ce13ec71096820a41eb9f4/conda/build_docker.sh#L58-L60 This is first step in pinning docker images for release.
1 parent c84ddc9 commit ad1b679

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

.github/workflows/build-conda-images.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ name: Build conda docker images
33
on:
44
push:
55
branches:
6-
main
6+
- main
7+
- release/*
8+
tags:
9+
# NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds
10+
# Release candidate tags look like: v1.11.0-rc1
11+
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
712
paths:
813
- conda/Dockerfile
914
- 'common/*'
@@ -19,7 +24,7 @@ env:
1924
DOCKER_BUILDKIT: 1
2025
DOCKER_ID: ${{ secrets.DOCKER_ID }}
2126
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
22-
WITH_PUSH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
27+
WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release')) }}
2328

2429
jobs:
2530
build-docker:

.github/workflows/build-libtorch-images.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ name: Build libtorch docker images
33
on:
44
push:
55
branches:
6-
main
6+
- main
7+
- release/*
8+
tags:
9+
# NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds
10+
# Release candidate tags look like: v1.11.0-rc1
11+
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
712
paths:
813
- .github/workflows/build-libtorch-images.yml
914
- libtorch/Dockerfile
@@ -21,7 +26,7 @@ env:
2126
DOCKER_BUILDKIT: 1
2227
DOCKER_ID: ${{ secrets.DOCKER_ID }}
2328
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
24-
WITH_PUSH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
29+
WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release')) }}
2530

2631
jobs:
2732
build-docker-cuda:

.github/workflows/build-manywheel-images.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ name: Build manywheel docker images
33
on:
44
push:
55
branches:
6-
main
6+
- main
7+
- release/*
8+
tags:
9+
# NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds
10+
# Release candidate tags look like: v1.11.0-rc1
11+
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
712
paths:
813
- .github/workflows/build-manywheel-images.yml
914
- manywheel/Dockerfile
@@ -23,7 +28,7 @@ env:
2328
DOCKER_BUILDKIT: 1
2429
DOCKER_ID: ${{ secrets.DOCKER_ID }}
2530
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
26-
WITH_PUSH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
31+
WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release')) }}
2732

2833
jobs:
2934
build-docker-cuda:

0 commit comments

Comments
 (0)