[IRBuilder] Refactor FMF interface (#121657)
[llvm-project.git] / .github / workflows / libcxx-build-containers.yml
blob2d040f712ce592b1190cfbdc5a8aeb1190ba1613
1 # This file defines an action that builds the various Docker images used to run
2 # libc++ CI whenever modifications to those Docker files are pushed to `main`.
4 # The images are pushed to the LLVM package registry at https://github.com/orgs/llvm/packages
5 # and tagged appropriately. The selection of which Docker image version is used by the libc++
6 # CI nodes at any given point is controlled from the workflow files themselves.
8 name: Build Docker images for libc++ CI
10 permissions:
11   contents: read
12   packages: write
14 on:
15   push:
16     branches:
17       - main
18     paths:
19       - 'libcxx/utils/ci/**'
20       - '.github/workflows/libcxx-build-containers.yml'
21   pull_request:
22     branches:
23       - main
24     paths:
25       - 'libcxx/utils/ci/**'
26       - '.github/workflows/libcxx-build-containers.yml'
28 jobs:
29   build-and-push:
30     runs-on: ubuntu-latest
31     if: github.repository_owner == 'llvm'
32     permissions:
33       packages: write
35     steps:
36     - uses: actions/checkout@v4
38     - name: Build the Linux builder image
39       working-directory: libcxx/utils/ci
40       run: docker compose build actions-builder
41       env:
42         TAG: ${{ github.sha }}
44     # - name: Build the Android builder image
45     #   working-directory: libcxx/utils/ci
46     #   run: docker compose build android-buildkite-builder
47     #   env:
48     #     TAG: ${{ github.sha }}
50     - name: Log in to GitHub Container Registry
51       uses: docker/login-action@v3
52       with:
53         registry: ghcr.io
54         username: ${{ github.actor }}
55         password: ${{ secrets.GITHUB_TOKEN }}
57     - name: Push the Linux builder image
58       if: github.event_name == 'push'
59       working-directory: libcxx/utils/ci
60       run: |
61         docker compose push actions-builder
62       env:
63         TAG: ${{ github.sha }}
65     # - name: Push the Android builder image
66     #   if: github.event_name == 'push'
67     #   working-directory: libcxx/utils/ci
68     #   run: |
69     #     docker compose push android-buildkite-builder
70     #   env:
71     #     TAG: ${{ github.sha }}