Skip to content

Commit fa25ac6

Browse files
Merge pull request #174 from qualcomm-linux/development
ci: refactor pkg workflow release pipeline
2 parents 9b818da + 77b5805 commit fa25ac6

15 files changed

Lines changed: 831 additions & 572 deletions

.github/pkg-workflows/debian/pkg-pr-hook.yml

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PR Pre and Post Merge Build
1+
name: PR Build
22

33
on:
44
pull_request:
@@ -10,41 +10,15 @@ permissions:
1010
packages: read
1111

1212
jobs:
13-
resolve-suite:
14-
name: Resolve suite from branch
15-
if: github.repository_owner == 'qualcomm-linux' && github.repository != 'qualcomm-linux/pkg-template'
16-
runs-on: ubuntu-latest
17-
outputs:
18-
suite: ${{ steps.resolve.outputs.suite }}
19-
steps:
20-
- name: Derive suite from target branch
21-
id: resolve
22-
env:
23-
BASE_REF: ${{ github.base_ref }}
24-
run: |
25-
set -euo pipefail
26-
case "$BASE_REF" in
27-
qcom/ubuntu/*|qcom/debian/*)
28-
suite="${BASE_REF##*/}"
29-
;;
30-
*)
31-
suite=sid
32-
;;
33-
esac
34-
echo "suite=$suite" >> "$GITHUB_OUTPUT"
35-
echo "Resolved suite: $suite (from branch: $BASE_REF)"
36-
3713
build:
38-
name: Build Debian Package
39-
needs: resolve-suite
14+
name: PR Build
4015
if: ${{ github.event.action != 'closed' || github.event.pull_request.merged == true }}
4116
uses: qualcomm-linux/qcom-build-utils/.github/workflows/pkg-build-reusable-workflow.yml@main
4217
with:
4318
qcom-build-utils-ref: main
4419
# PRE-MERGE: use the PR head branch (github.head_ref)
4520
# POST-MERGE: use the base branch name from the PR
4621
debian-ref: ${{ (github.event.action == 'closed' && github.event.pull_request.merged) && github.event.pull_request.base.ref || github.head_ref }}
47-
suite: ${{ needs.resolve-suite.outputs.suite }}
4822
debusine-parent-workspace: ${{ vars.DEBUSINE_PARENT_WORKSPACE }}
4923
secrets:
5024
DEBUSINE_USER: ${{ secrets.DEBUSINE_USER }}

.github/pkg-workflows/main/pkg-build.yml renamed to .github/pkg-workflows/qli-ci/pkg-build.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Debian Package
1+
name: Build
22
description: |
33
Builds the debian package represented by this repo at the ref pointed by the debain-ref argument.
44
@@ -12,20 +12,6 @@ on:
1212
required: true
1313
default: qcom/debian/latest
1414

15-
suite:
16-
description: The distribution codename or Debian suite to build for. Ex noble, questing, resolute, trixie, sid, unstable
17-
type: choice
18-
default: unstable
19-
options:
20-
- noble
21-
- questing
22-
- resolute
23-
- unstable
24-
- forky
25-
- trixie
26-
- bookworm
27-
- sid
28-
2915
force-docker-build:
3016
description: Force local pkg-builder instead of Debusine for Debian-family suites
3117
type: boolean
@@ -37,11 +23,11 @@ permissions:
3723

3824
jobs:
3925
build:
26+
name: Build
4027
uses: qualcomm-linux/qcom-build-utils/.github/workflows/pkg-build-reusable-workflow.yml@main
4128
with:
4229
qcom-build-utils-ref: main
4330
debian-ref: ${{ inputs.debian-ref }}
44-
suite: ${{ inputs.suite }}
4531
force-docker-build: ${{ inputs.force-docker-build }}
4632
debusine-parent-workspace: ${{ vars.DEBUSINE_PARENT_WORKSPACE }}
4733
secrets:

.github/pkg-workflows/main/pkg-promote-prebuilt.yml renamed to .github/pkg-workflows/qli-ci/pkg-promote-prebuilt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Promote New Prebuilt Binary Version
1+
name: Promote Prebuilt
22

33
on:
44
workflow_dispatch:

.github/pkg-workflows/main/pkg-promote.yml renamed to .github/pkg-workflows/qli-ci/pkg-promote.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Promote New Upstream Version
1+
name: Promote
22

33
on:
44
workflow_dispatch:
@@ -7,8 +7,7 @@ on:
77
debian-branch:
88
description: The debian branch to apply the promotion to. For example branch "qcom/debian/latest"
99
type: string
10-
required: false
11-
default: qcom/debian/latest
10+
required: true
1211

1312
upstream-tag:
1413
description: The upstream tag to promote this package repo to. Eg, v1.1.0 or 1.2.0, depending on the versioning style
@@ -22,6 +21,7 @@ permissions:
2221

2322
jobs:
2423
promote:
24+
name: Promote
2525

2626
uses: qualcomm-linux/qcom-build-utils/.github/workflows/pkg-promote-reusable-workflow.yml@main
2727
with:
Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release Version
1+
name: Release
22
description: |
33
Release a new package version.
44
This workflow is manually triggered via workflow_dispatch.
@@ -7,30 +7,15 @@ on:
77
workflow_dispatch:
88
inputs:
99

10-
suite:
11-
description: The distribution codename or Debian suite to release for. Ex noble, questing, resolute, trixie, bookworm, sid, unstable
12-
type: choice
13-
default: noble
14-
options:
15-
- noble
16-
- questing
17-
- resolute
18-
- unstable
19-
- forky
20-
- trixie
21-
- bookworm
22-
- sid
23-
2410
debian-branch:
25-
description: The debian branch to use to execute the release from. For example branch "qcom/debian/latest"
11+
description: The debian branch to release. For example branch "qcom/debian/trixie"
2612
type: string
27-
required: false
28-
default: qcom/debian/latest
13+
required: true
2914

3015
test-run:
3116
description: |
32-
Debian suites: if true, stop after the Debusine build and installability test.
33-
Ubuntu codenames: preserve the previous release flow, including upload to the test S3 location.
17+
Debian: if true, stop after build/test.
18+
Ubuntu: still runs the full release flow.
3419
type: boolean
3520
default: true
3621

@@ -39,12 +24,10 @@ permissions:
3924
packages: read
4025

4126
jobs:
42-
release:
43-
27+
Release:
4428
uses: qualcomm-linux/qcom-build-utils/.github/workflows/pkg-release-reusable-workflow.yml@main
4529
with:
4630
qcom-build-utils-ref: main
47-
suite: ${{ github.event.inputs.suite }}
4831
debian-branch: ${{ github.event.inputs.debian-branch }}
4932
test-run: ${{ github.event.inputs.test-run == 'true' && true || false }}
5033
debusine-parent-workspace: ${{ vars.DEBUSINE_PARENT_WORKSPACE }}
@@ -53,3 +36,4 @@ jobs:
5336
DEBUSINE_USER: ${{ secrets.DEBUSINE_USER }}
5437
DEBUSINE_TOKEN: ${{ secrets.DEBUSINE_TOKEN }}
5538
DEBUSINE_RELEASE_TOKEN: ${{ secrets.DEBUSINE_RELEASE_TOKEN }}
39+
QSC_API_KEY: ${{ secrets.DEB_PKG_BOT_CI_QSC_TOKEN }}

0 commit comments

Comments
 (0)