Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .github/workflows/apt.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Pull Request
name: Build

on:
pull_request:
Expand All @@ -14,6 +14,14 @@ on:
workflow_dispatch:
workflow_call:

run-name: >-
${{ (github.ref_name == 'unstable'
|| github.event_name == 'workflow_dispatch'
|| github.event_name == 'workflow_call')
&& 'Build Unstable'
|| format('Build on {0} to {1}', github.event_name, github.ref_name)
}}

jobs:
build-n-test:
uses: ./.github/workflows/build-n-test-all-distros.yml
Expand All @@ -22,11 +30,14 @@ jobs:
BUILD_ARCHS: ${{ vars.BUILD_ARCHS }}
BUILD_EXCLUDE: ${{ vars.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES: ${{ vars.SMOKE_TEST_IMAGES }}
# determine whether we should use special "unstable" release_tag
# Assume that for unstable branch and for any external call or dispatch
# we are building unstable release
# In other cases it's a regular PR/push build
release_tag: >-
${{ (github.ref_name == 'unstable'
|| github.event_name == 'workflow_dispatch'
|| github.event_name == 'workflow_call')
&& 'unstable'
|| ''
}}
checkout_ref: ${{ github.ref_name == 'unstable' && 'unstable' || '' }}
}}
16 changes: 6 additions & 10 deletions .github/workflows/build-n-test-all-distros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ on:
type: string
SMOKE_TEST_IMAGES:
type: string
checkout_ref:
type: string
default: ''


jobs:
build-source-package:
Expand All @@ -30,7 +26,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout_ref || '' }}
ref: ${{ inputs.release_tag == 'unstable' && 'unstable' || '' }}
- name: Ensure Release Branch
if: inputs.release_tag != '' && inputs.release_tag != 'unstable'
id: ensure-branch
Expand All @@ -43,7 +39,7 @@ jobs:
with:
dist: ${{ matrix.dist }}
release_tag: ${{ inputs.release_tag }}
checkout_ref: ${{ inputs.checkout_ref || '' }}
checkout_ref: ${{ inputs.release_tag == 'unstable' && 'unstable' || '' }}

build-binary-package:
runs-on: ${{ contains(matrix.arch, 'arm') && 'ubuntu24-arm64-2-8' || 'ubuntu-24.04' }}
Expand All @@ -58,7 +54,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout_ref || '' }}
ref: ${{ inputs.release_tag == 'unstable' && 'unstable' || '' }}
- name: Ensure Release Branch
if: inputs.release_tag != '' && inputs.release_tag != 'unstable'
id: ensure-branch
Expand All @@ -72,7 +68,7 @@ jobs:
dist: ${{ matrix.dist }}
arch: ${{ matrix.arch }}
run_id: ${{ github.run_id }}
checkout_ref: ${{ inputs.checkout_ref || '' }}
checkout_ref: ${{ inputs.release_tag == 'unstable' && 'unstable' || '' }}

smoke-test-archs:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -103,10 +99,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout_ref || '' }}
ref: ${{ inputs.release_tag == 'unstable' && 'unstable' || '' }}
- uses: ./.github/actions/run-smoke-tests
with:
image: ${{ matrix.image }}
arch: ${{ matrix.arch }}
run_id: ${{ github.run_id }}
checkout_ref: ${{ inputs.checkout_ref || '' }}
checkout_ref: ${{ inputs.release_tag == 'unstable' && 'unstable' || '' }}