-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (64 loc) · 2.43 KB
/
base-containers.yaml
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
72
73
74
75
76
77
78
name: Build Deploy Containers
on:
# Always have a base image ready to go - this is a nightly build
schedule:
- cron: 0 3 * * *
# On pull request we test updates to images
pull_request: []
# On push to main we build and deploy images
push:
branches:
- main
jobs:
build:
permissions:
packages: write
strategy:
fail-fast: false
matrix:
# Note: this can be extended in two ways
# 1. Add more configurations to the matrix, either like this or flattening
# 2. Generate matrix programatically and pipe in (recommended)
# perl is 5.30.0 provided by 20.04 container base
ubuntu: ["20.04"]
boost: ["1.73.0"]
elfutils: ["0.186"]
libiberty: ["2.33.1"]
inteltbb: ["2020.2"]
runs-on: ubuntu-latest
name: Build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Make Space For Build
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
- name: Set Organization Name for Packages Registry
if: (github.event_name != 'schedule')
env:
org: ${{ github.event.repository.owner.login }}
run: echo "org=${org}" >> ${GITHUB_ENV}
- name: Set Organization Name for Packages Registry
if: (github.event_name == 'schedule')
run: echo "org=researchapps" >> ${GITHUB_ENV}
- name: Pull Layers for "Cache"
run: docker pull ghcr.io/${org}/dyninst-ubuntu-${{ matrix.ubuntu }}:latest || echo "No cache available"
- name: Build Dyninst Base Container
run: |
docker build --build-arg ubuntu_version=${{ matrix.ubuntu }} \
--build-arg BOOST_VERSION=${{ matrix.boost }} \
--build-arg ELFUTILS_VERSION=${{ matrix.elfutils }} \
--build-arg LIBIBERTY_VERSION=${{ matrix.libiberty }} \
--build-arg INTELTBB_VERSION=${{ matrix.inteltbb }} \
-t ghcr.io/${org}/dyninst-ubuntu-${{ matrix.ubuntu }}:latest .
- name: GHCR Login
if: (github.event_name != 'pull_request')
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy
if: (github.event_name != 'pull_request')
run: docker push ghcr.io/${org}/dyninst-ubuntu-${{ matrix.ubuntu }}:latest