Skip to content

Commit 8bdc31f

Browse files
Transfer more stuff over
Signed-off-by: Simon Beaudoin <sbeaudoi@qti.qualcomm.com>
1 parent 6d78ecf commit 8bdc31f

File tree

2 files changed

+29
-59
lines changed

2 files changed

+29
-59
lines changed

.github/actions/build_container/action.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,28 @@ runs:
3030
shell: bash
3131
run: ./docker_deb_build.py --rebuild
3232

33+
# - name: Checkout pkg-example at debian/latest and tags
34+
# uses: actions/checkout@v4
35+
# with:
36+
# repository: qualcomm-linux/pkg-example
37+
# ref: debian/latest
38+
# token: ${{inputs.token}}
39+
# path: ./pkg-example
40+
# fetch-depth: 0
41+
# fetch-tags: true
42+
43+
# - name: Build example package for noble
44+
# shell: bash
45+
# run: |
46+
# mkdir -p build_noble
47+
# ./scripts/docker_deb_build.py --source-dir pkg-example --output-dir build_noble --distro noble
48+
49+
# - name: Build example package for questing
50+
# shell: bash
51+
# run: |
52+
# mkdir -p build_questing
53+
# ./scripts/docker_deb_build.py --source-dir pkg-example --output-dir build_questing --distro questing
54+
3355
# Don't push to GHCR if build was triggered by a PR
3456
- name: Push to GHCR
3557
if: ${{inputs.push-to-ghcr}} == 'true'

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

Lines changed: 7 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,21 @@ on:
1313
pull_request_target:
1414
branches:
1515
- main
16-
- development
16+
paths:
17+
- '.github/workflows/qcom-container-build-and-upload.yml'
18+
- 'docker/**'
1719

1820
push:
1921
branches:
2022
- main
23+
paths:
24+
- '.github/workflows/qcom-container-build-and-upload.yml'
25+
- 'docker/**'
2126

2227
workflow_dispatch:
2328

2429
permissions:
2530
contents: read
26-
security-events: write
2731

2832
env:
2933
QCOM_ORG_NAME: "qualcomm-linux"
@@ -32,65 +36,11 @@ env:
3236

3337
jobs:
3438

35-
# Check if this PR changes files in the docker/ folder. If not, there is no point in building and pushing a new image.
36-
check-if-build-needed:
37-
runs-on: ubuntu-latest
38-
outputs:
39-
build-needed: ${{ steps.set-output.outputs.build-needed }}
40-
steps:
41-
42-
- name: Checkout
43-
uses: actions/checkout@v4
44-
with:
45-
ref: ${{github.head_ref}}
46-
fetch-depth: 0
47-
48-
- name: Check if build is needed
49-
id: set-output
50-
run: |
51-
echo "build-needed=false" >> $GITHUB_OUTPUT
52-
53-
if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
54-
CHANGED_FILES=$(git diff --name-only origin/main...HEAD)
55-
echo "Changed files: $CHANGED_FILES"
56-
if [[ $CHANGED_FILES == *"docker/"* ]]; then
57-
echo "Build IS needed as docker/ folder changed."
58-
echo "build-needed=true" >> $GITHUB_OUTPUT
59-
else
60-
echo "Build is NOT needed as docker/ folder did not change."
61-
echo "build-needed=false" >> $GITHUB_OUTPUT
62-
fi
63-
64-
elif [[ "${{ github.event_name }}" == "push" ]]; then
65-
CHANGED_FILES=$(git diff --name-only ${{ github.event.before }}..${{ github.event.after }})
66-
echo "Changed files: $CHANGED_FILES"
67-
if [[ $CHANGED_FILES == *".github/docker/"* ]]; then
68-
echo "Build IS needed as .github/docker/ folder changed."
69-
echo "build-needed=true" >> $GITHUB_OUTPUT
70-
else
71-
echo "Build is NOT needed as .github/docker/ folder did not change."
72-
echo "build-needed=false" >> $GITHUB_OUTPUT
73-
fi
74-
elif [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
75-
echo "Build is needed for schedule or workflow_dispatch or schedule."
76-
echo "build-needed=true" >> $GITHUB_OUTPUT
77-
else
78-
echo "Unrecognized event: ${{ github.event_name }}. Failing the build."
79-
exit 1
80-
fi
81-
8239
# Build the amd64 natively on ubuntu-latest which is an x86_64 host
8340
build-image-amd64:
84-
needs: check-if-build-needed
85-
if: needs.check-if-build-needed.outputs.build-needed == 'true'
8641
runs-on: ubuntu-latest
8742
steps:
8843

89-
- name: Checkout
90-
uses: actions/checkout@v4
91-
with:
92-
ref: ${{github.head_ref}}
93-
9444
- name: Build Images
9545
uses: ./.github/actions/build_container
9646
with:
@@ -103,11 +53,9 @@ jobs:
10353
# Cross compiling the image using buildx on an x86_64 host was tried but failed due to
10454
# issues with qemu and multiarch support in docker buildx.
10555
build-image-arm64:
106-
needs: check-if-build-needed
107-
if: needs.check-if-build-needed.outputs.build-needed == 'true'
10856
runs-on: ["self-hosted", "lecore-prd-u2404-arm64-xlrg-od-ephem"]
10957
steps:
110-
- name: Checkout
58+
- name: Checkout Dockerfile
11159
uses: actions/checkout@v4
11260
with:
11361
ref: ${{github.head_ref}}

0 commit comments

Comments
 (0)