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