Skip to content

Commit ca960b6

Browse files
authored
Build the docker image from a ciflow/docker label (#3977)
- Build the tutorials image from a `ciflow/docker` label instead of on every PR, because fork PRs can't get the AWS token needed to push to ECR. - The labeler adds the label when `.ci/docker` changes.
1 parent c80a434 commit ca960b6

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

‎.github/labeler.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"ciflow/docker":
2+
globs:
3+
- .ci/docker/**
4+
- .github/workflows/docker-build.yml
5+
draft: false

‎.github/pytorch-probot.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
tracking_issue: 1896
2+
ciflow_push_tags:
3+
- ciflow/docker
4+
labeler_config: labeler.yml

‎.github/workflows/docker-build.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: Docker Build
22

33
on:
44
workflow_dispatch:
5-
pull_request:
6-
paths:
7-
- .ci/docker/**
8-
- .github/workflows/docker-builds.yml
95
push:
106
branches:
117
- main
8+
# A fork PR gets no OIDC token to push to ECR, so a PR opts in with the
9+
# ciflow/docker label instead, which pushes this tag from the base repo.
10+
tags:
11+
- ciflow/docker/*
1212
paths:
1313
- .ci/docker/**
14-
- .github/workflows/docker-builds.yml
14+
- .github/workflows/docker-build.yml
1515

1616
jobs:
1717
docker-build:

0 commit comments

Comments
 (0)