-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (40 loc) · 1.46 KB
/
devcontainer.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
#
# Copyright (c) 2024, Trail of Bits, Inc.
# All rights reserved.
#
# This source code is licensed in accordance with the terms specified in
# the LICENSE file found in the root directory of this source tree.
#
name: Build Dev Container
on: workflow_dispatch
jobs:
build:
strategy:
matrix:
llvm-version: [18]
image-version: [22.04]
runs-on: ubuntu-22.04
timeout-minutes: 45
permissions:
packages: write
contents: read
env:
IMAGE_NAME: "ghcr.io/lifting-bits/patchestry-ubuntu-${{ matrix.image-version }}-llvm-${{ matrix.llvm-version }}-dev:latest"
steps:
- name: Cleanup working directory with container root
run: |
docker run --rm -v $(pwd):/workspace -w /workspace ubuntu:latest find . -name . -o -prune -exec rm -rf -- {} + || true
- name: Clone the Patchestry repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
- name: Build image
working-directory: .devcontainer
run: |
docker pull ubuntu:${{ matrix.image-version }}
docker build . --no-cache -t "${IMAGE_NAME}" --build-arg="IMAGE=ubuntu-${{ matrix.image-version }}" --build-arg="LLVM_VERSION=${{ matrix.llvm-version }}"
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image
run: docker push "${IMAGE_NAME}"