Skip to content

Commit e07bd02

Browse files
committed
Add _docker-image.yml
Consumer-side counterpart of the docker-builds move, landing here so the linux_job_v3 migration can build on it. linux_job_v3 passes docker-image straight to the runner pod's container, which is pulled before any step runs, so v2's in-job calculate-docker-image -- which resolved ci-image:<name> to an ECR reference -- has nowhere left to run. This emits the same tag docker-builds computes and callers name the image with it. Like pytorch's OSDC jobs, nothing waits for the images: a commit that changes .ci/docker needs the ciflow/docker label, and without it the pod fails to pull. Nothing calls this yet; the callers arrive in #22245 onward. Authored with Claude Code.
1 parent d4c09e3 commit e07bd02

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Resolve CI docker image
2+
3+
# linux_job_v3 passes `docker-image` straight to the runner pod's container, which
4+
# is pulled before any step runs, so nothing inside the job can derive it. Callers
5+
# depend on this workflow and name the image as
6+
# 308535385114.dkr.ecr.us-east-1.amazonaws.com/executorch/ci-image:<name>-<hash>.
7+
#
8+
# Nothing here waits for docker-builds. A commit that changes .ci/docker needs the
9+
# ciflow/docker label to build the images it asks for; without them the pod fails
10+
# to pull and the job has to be re-run once they land.
11+
12+
on:
13+
workflow_call:
14+
outputs:
15+
ci-docker-hash:
16+
description: Tag suffix shared by every executorch CI image for this commit.
17+
value: ${{ jobs.resolve.outputs.ci-docker-hash }}
18+
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
resolve:
24+
name: resolve
25+
runs-on: ubuntu-latest
26+
timeout-minutes: 10
27+
outputs:
28+
ci-docker-hash: ${{ steps.hash.outputs.ci-docker-hash }}
29+
30+
steps:
31+
- name: Checkout ExecuTorch
32+
uses: actions/checkout@v4
33+
with:
34+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
35+
36+
- name: Compute the docker tag
37+
id: hash
38+
run: |
39+
set -eu
40+
echo "ci-docker-hash=$(git rev-parse HEAD:.ci/docker)" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)