Skip to content

Container Build And Upload #43

Container Build And Upload

Container Build And Upload #43

name: Container Build And Upload
description: |
Builds and uploads to GHCR (GitHub Container Registry) the container used to build the Qualcomm debian packages.
This workflow will assumes the build architecture is amd64 (x86_64) since the github's 'ubuntu-latest' runs-on tag
is used. Using docker's buildx, the Dockerfile in this repo's docker/ folder will be built for amd64 and cross-compiled
for arm64.
on:
schedule:
# Runs at 00:00 UTC every Monday
- cron: '0 0 * * 1'
pull_request_target:
branches:
- main
paths:
- '.github/workflows/qcom-container-build-and-upload.yml'
- '.github/actions/build_container/action.yml'
- 'Dockerfiles/**'
push:
branches:
- main
paths:
- '.github/workflows/qcom-container-build-and-upload.yml'
- '.github/actions/build_container/action.yml'
- 'Dockerfiles/**'
workflow_dispatch:
permissions:
contents: read
env:
QCOM_ORG_NAME: "qualcomm-linux"
IMAGE_NAME: "pkg-builder"
jobs:
# Build the amd64 natively on ubuntu-latest which is an x86_64 host
build-image-amd64:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{github.head_ref}}
- name: Build Images
uses: ./.github/actions/build_container
with:
arch: amd64
push-to-ghcr: ${{ github.event_name != 'pull_request_target' }}
token: ${{ secrets.DEB_PKG_BOT_CI_TOKEN }}
username: ${{ vars.DEB_PKG_BOT_CI_USERNAME }}
# Build the arm64 natively using a self-hosted runner on an arm64 host
# Cross compiling the image using buildx on an x86_64 host was tried but failed due to
# issues with qemu and multiarch support in docker buildx.
build-image-arm64:
runs-on: ["self-hosted", "lecore-prd-u2404-arm64-xlrg-od-ephem"]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{github.head_ref}}
- name: Build Images
uses: ./.github/actions/build_container
with:
arch: arm64
push-to-ghcr: ${{ github.event_name != 'pull_request_target' }}
token: ${{ secrets.DEB_PKG_BOT_CI_TOKEN }}
username: ${{ vars.DEB_PKG_BOT_CI_USERNAME }}