instead of hardwiring the toolchain image in github workflows, read it from `tools/toolchain/image`. a dedicated reusable workflow is added to read from this file, and expose its content with an output parameter. also, switch iwyu.yaml workflow to this image, more maintainable this way. please note, before this change, we are also using the latest stable build of clang, and since fedora 40 is also using the clang 18, so the behavior is not change. but with this change, we don't have the flexibility of using other clang versions provided https://apt.llvm.org in future. Signed-off-by: Kefu Chai <kefu.chai@scylladb.com> Closes scylladb/scylladb#19655
24 lines
561 B
YAML
24 lines
561 B
YAML
name: Read Toolchain
|
|
|
|
on:
|
|
workflow_call:
|
|
outputs:
|
|
image:
|
|
description: "the toolchain docker image"
|
|
value: ${{ jobs.read-toolchain.outputs.image }}
|
|
|
|
jobs:
|
|
read-toolchain:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
image: ${{ steps.read.outputs.image }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
sparse-checkout: tools/toolchain/image
|
|
sparse-checkout-cone-mode: false
|
|
- id: read
|
|
run: |
|
|
image=$(cat tools/toolchain/image)
|
|
echo "image=$image" >> $GITHUB_OUTPUT
|