Description
Describe the problem
The reusable workflow runs in the ubuntu-latest
runner machine:
End user workflows are most likely to use the action in a job with either that convenient ubuntu-latest
runner, or else the latest version specific ubuntu-24.04
.
GitHub recently changed the ubuntu-latest
runner label to point to the ubuntu-24.04
runner instead of the ubuntu-22.04
runner.
🐛 The action and reusable workflow fail on the ubuntu-24.04
runner machine:
# Import LLVM GPG key without using apt-key
wget -q -O - https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg
# Add the LLVM repository with the GPG keyring
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/focal/ llvm-toolchain-focal-9 main" | sudo tee /etc/apt/sources.list.d/llvm.list > /dev/null
# Update the package lists
sudo apt-get -qq update
# Install libclang and other necessary packages
sudo apt-get -qq install -y libclang1-9 libclang-cpp9 > /dev/null
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
E: Unable to correct problems, you have held broken packages.
Error: Process completed with exit code 100.
To reproduce
Reusable workflow
Use the reusable workflow in any workflow.
on:
push:
permissions:
contents: write
jobs:
render-docs:
uses: arduino/render-docs-github-action/.github/workflows/render-docs.yml@main
with:
source-path: './src'
target-path: './docs/api.md'
Action
Use the action in a workflow job that uses the ubuntu-latest
or ubuntu-24.04
runner:
on:
push:
permissions:
contents: write
jobs:
render-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/render-docs-github-action@main
with:
source-path: './src'
target-path: './docs/api.md'
🐛 The workflow run fails with an "E: Unable to correct problems, you have held broken packages.
" error.
Expected behavior
Action can be used with the latest GitHub Hosted Ubuntu runner.
Reusable workflow is functional.
arduino/render-docs-github-action version
Additional context
The error does not occur if the ubuntu-22.04
runner is used.
Related
Workaround
When using the action, the fault can be worked around by configuring the workflow job to use the ubuntu-22.04
runner:
runs-on: ubuntu-22.04