From 00462c4e81602467c0912e20a5a230c55cc78c8c Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 7 Jul 2023 11:00:15 -0700 Subject: [PATCH 1/2] Rebuild docker images on release --- .github/workflows/build-conda-images.yml | 5 +++++ .github/workflows/build-libtorch-images.yml | 5 +++++ .github/workflows/build-manywheel-images.yml | 7 ++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-conda-images.yml b/.github/workflows/build-conda-images.yml index 8a394e38f..790bd06b7 100644 --- a/.github/workflows/build-conda-images.yml +++ b/.github/workflows/build-conda-images.yml @@ -4,6 +4,11 @@ on: push: branches: main + release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ paths: - conda/Dockerfile - 'common/*' diff --git a/.github/workflows/build-libtorch-images.yml b/.github/workflows/build-libtorch-images.yml index a556a1bd6..8d1408e6b 100644 --- a/.github/workflows/build-libtorch-images.yml +++ b/.github/workflows/build-libtorch-images.yml @@ -4,6 +4,11 @@ on: push: branches: main + release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ paths: - .github/workflows/build-libtorch-images.yml - libtorch/Dockerfile diff --git a/.github/workflows/build-manywheel-images.yml b/.github/workflows/build-manywheel-images.yml index b9194a6d1..bad940961 100644 --- a/.github/workflows/build-manywheel-images.yml +++ b/.github/workflows/build-manywheel-images.yml @@ -4,6 +4,11 @@ on: push: branches: main + release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ paths: - .github/workflows/build-manywheel-images.yml - manywheel/Dockerfile @@ -23,7 +28,7 @@ env: DOCKER_BUILDKIT: 1 DOCKER_ID: ${{ secrets.DOCKER_ID }} DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} - WITH_PUSH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release')) }} jobs: build-docker-cuda: From b22cd6496699ed8a545c0caada1c3819c6c34968 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 7 Jul 2023 11:02:42 -0700 Subject: [PATCH 2/2] Include with-push --- .github/workflows/build-conda-images.yml | 2 +- .github/workflows/build-libtorch-images.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-conda-images.yml b/.github/workflows/build-conda-images.yml index 790bd06b7..3fc26a69e 100644 --- a/.github/workflows/build-conda-images.yml +++ b/.github/workflows/build-conda-images.yml @@ -24,7 +24,7 @@ env: DOCKER_BUILDKIT: 1 DOCKER_ID: ${{ secrets.DOCKER_ID }} DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} - WITH_PUSH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release')) }} jobs: build-docker: diff --git a/.github/workflows/build-libtorch-images.yml b/.github/workflows/build-libtorch-images.yml index 8d1408e6b..a054cee53 100644 --- a/.github/workflows/build-libtorch-images.yml +++ b/.github/workflows/build-libtorch-images.yml @@ -26,7 +26,7 @@ env: DOCKER_BUILDKIT: 1 DOCKER_ID: ${{ secrets.DOCKER_ID }} DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} - WITH_PUSH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release')) }} jobs: build-docker-cuda: