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
4 changes: 4 additions & 0 deletions .github/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
BUILD_ARCHS=["i386", "amd64", "arm64", "armhf"]
BUILD_DISTS=["noble", "jammy", "bookworm", "trixie"]
BUILD_EXCLUDE=[ {"dist":"noble", "arch":"i386"}, {"dist":"jammy", "arch":"i386"} ]
SMOKE_TEST_IMAGES=["ubuntu:jammy", "ubuntu:noble", "debian:bookworm", "debian:trixie"]
37 changes: 37 additions & 0 deletions .github/actions/parse-env-file/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Parse env file"
description: "Parses .env environment file and extracts all available fields as outputs"

inputs:
env_file_path:
description: ".env file path"
default: '.github/.env'
required: false

outputs:
BUILD_ARCHS:
description: "The extracted BUILD_DISTS from .env file"
value: ${{ steps.parse.outputs.BUILD_ARCHS }}
BUILD_DISTS:
description: "The extracted BUILD_DISTS from .env file"
value: ${{ steps.parse.outputs.BUILD_DISTS }}
BUILD_EXCLUDE:
description: "The extracted BUILD_EXCLUDE from .env file"
value: ${{ steps.parse.outputs.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES:
description: "The extracted SMOKE_TEST_IMAGES from .env file"
value: ${{ steps.parse.outputs.SMOKE_TEST_IMAGES }}

runs:
using: "composite"
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Parse release handle
id: parse
shell: bash
run: |
cat "${{ inputs.env_file_path }}" | while IFS= read -r line || [[ -n "$line" ]]; do
[[ -z "$line" || "$line" =~ ^# ]] && continue
echo "$line" >> "$GITHUB_OUTPUT"
done
24 changes: 20 additions & 4 deletions .github/workflows/apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,29 @@ run-name: >-
}}

jobs:
populate-env-vars:
runs-on: ["ubuntu-latest"]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Parse vars
id: parse
uses: ./.github/actions/parse-env-file
outputs:
BUILD_ARCHS: ${{ steps.parse.outputs.BUILD_ARCHS }}
BUILD_DISTS: ${{ steps.parse.outputs.BUILD_DISTS }}
BUILD_EXCLUDE: ${{ steps.parse.outputs.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES: ${{ steps.parse.outputs.SMOKE_TEST_IMAGES }}

build-n-test:
uses: ./.github/workflows/build-n-test-all-distros.yml
needs: populate-env-vars
with:
BUILD_DISTS: ${{ vars.BUILD_DISTS }}
BUILD_ARCHS: ${{ vars.BUILD_ARCHS }}
BUILD_EXCLUDE: ${{ vars.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES: ${{ vars.SMOKE_TEST_IMAGES }}
BUILD_DISTS: ${{ needs.populate-env-vars.outputs.BUILD_DISTS }}
BUILD_ARCHS: ${{ needs.populate-env-vars.outputs.BUILD_ARCHS }}
BUILD_EXCLUDE: ${{ needs.populate-env-vars.outputs.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES: ${{ needs.populate-env-vars.outputs.SMOKE_TEST_IMAGES }}
# Determine whether we should use special "unstable" release_tag. Assume
# that for unstable branch and for any external call, dispatch or schedule
# we are building unstable release. In other cases it's a regular PR/push
Expand Down
27 changes: 22 additions & 5 deletions .github/workflows/release_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,31 @@ jobs:
release_version_branch: ${{ steps.ensure-branch.outputs.release_version_branch }}
release_type: ${{ github.event.inputs.release_type }}

populate-env-vars:
runs-on: ["ubuntu-latest"]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Parse vars
id: parse
uses: ./.github/actions/parse-env-file
outputs:
BUILD_ARCHS: ${{ steps.parse.outputs.BUILD_ARCHS }}
BUILD_DISTS: ${{ steps.parse.outputs.BUILD_DISTS }}
BUILD_EXCLUDE: ${{ steps.parse.outputs.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES: ${{ steps.parse.outputs.SMOKE_TEST_IMAGES }}

build-n-test:
needs: prepare-release
needs:
- prepare-release
- populate-env-vars
uses: ./.github/workflows/build-n-test-all-distros.yml
with:
BUILD_DISTS: ${{ vars.BUILD_DISTS }}
BUILD_ARCHS: ${{ vars.BUILD_ARCHS }}
BUILD_EXCLUDE: ${{ vars.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES: ${{ vars.SMOKE_TEST_IMAGES }}
BUILD_DISTS: ${{ needs.populate-env-vars.outputs.BUILD_DISTS }}
BUILD_ARCHS: ${{ needs.populate-env-vars.outputs.BUILD_ARCHS }}
BUILD_EXCLUDE: ${{ needs.populate-env-vars.outputs.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES: ${{ needs.populate-env-vars.outputs.SMOKE_TEST_IMAGES }}
release_tag: ${{ inputs.release_tag }}

create-release-handle:
Expand Down