Skip to content

Commit de47b4a

Browse files
committed
Separate debian and RPM docker image build workflow jobs
These take a while to build, so might as well be parallel. Signed-off-by: Brett T. Warden <bwarden@qti.qualcomm.com>
1 parent 72d734d commit de47b4a

3 files changed

Lines changed: 62 additions & 13 deletions

File tree

.github/actions/build_container/action.yml renamed to .github/actions/build_deb_container/action.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: Builds the container and chroots
1+
name: Build Debian Containers
22
description: |
3-
This Github Action builds the containers and sets up the chroot environment for building packages for noble and questing.
3+
Builds the Debian-based containers (noble, questing, resolute, trixie, sid).
44
55
inputs:
66

@@ -23,13 +23,9 @@ inputs:
2323

2424
runs:
2525
using: "composite"
26-
26+
2727
steps:
2828

2929
- name: Build noble and questing containers
3030
shell: bash
3131
run: ./docker_deb_build.py --rebuild --no-update-check
32-
33-
- name: Build RPM-based containers
34-
shell: bash
35-
run: ./docker_rpm_build.py --rebuild --no-update-check
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build RPM Containers
2+
description: |
3+
Builds the RPM-based containers.
4+
5+
inputs:
6+
7+
arch:
8+
description: The architecture to build for. Ex amd64, arm64, etc
9+
required: true
10+
11+
push-to-ghcr:
12+
description: Whether to push the built image to GitHub Container Registry
13+
required: true
14+
default: "true"
15+
16+
token:
17+
description: PAT token
18+
required: true
19+
20+
username:
21+
description: Username for the PAT token
22+
required: true
23+
24+
runs:
25+
using: "composite"
26+
27+
steps:
28+
29+
- name: Build RPM containers
30+
shell: bash
31+
run: ./docker_rpm_build.py --rebuild --no-update-check

.github/workflows/qcom-container-build-and-upload.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ on:
1313
- main
1414
paths:
1515
- '.github/workflows/qcom-container-build-and-upload.yml'
16-
- '.github/actions/build_container/action.yml'
16+
- '.github/actions/build_deb_container/action.yml'
17+
- '.github/actions/build_rpm_container/action.yml'
1718
- 'Dockerfiles/**'
1819

1920
push:
2021
branches:
2122
- main
2223
paths:
2324
- '.github/workflows/qcom-container-build-and-upload.yml'
24-
- '.github/actions/build_container/action.yml'
25+
- '.github/actions/build_deb_container/action.yml'
26+
- '.github/actions/build_rpm_container/action.yml'
2527
- 'Dockerfiles/**'
2628

2729
workflow_dispatch:
@@ -40,15 +42,35 @@ jobs:
4042
# Build the arm64 natively using a self-hosted runner on an arm64 host
4143
# Cross compiling the image using buildx on an x86_64 host was tried but failed due to
4244
# issues with qemu and multiarch support in docker buildx.
43-
build-image-arm64:
45+
build-deb-arm64:
4446
runs-on: ubuntu-24.04-arm
4547
steps:
46-
4748
- name: Checkout repository
4849
uses: actions/checkout@v4
4950

50-
- name: Build Images
51-
uses: ./.github/actions/build_container
51+
- name: Build Debian Images
52+
uses: ./.github/actions/build_deb_container
53+
with:
54+
arch: arm64
55+
56+
- name: Upload Images
57+
uses: ./.github/actions/upload_containers
58+
# Only upload on trusted events that land code on main
59+
if: ${{ github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
60+
with:
61+
arch: arm64
62+
push-to-ghcr: "true"
63+
token: ${{ secrets.DEB_PKG_BOT_CI_TOKEN }}
64+
username: ${{ vars.DEB_PKG_BOT_CI_USERNAME }}
65+
66+
build-rpm-arm64:
67+
runs-on: ubuntu-24.04-arm
68+
steps:
69+
- name: Checkout repository
70+
uses: actions/checkout@v4
71+
72+
- name: Build RPM Images
73+
uses: ./.github/actions/build_rpm_container
5274
with:
5375
arch: arm64
5476

0 commit comments

Comments
 (0)