docker: fix hadolint issues #2309
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Centos build | |
on: | |
push: | |
branches: | |
- main | |
- 'maint-**' | |
pull_request: | |
branches: | |
- main | |
- 'maint-**' | |
env: | |
# Customize the env if | |
# Disable since mtl patched dpdk pcapng and this job use prebuilt pkg | |
MTL_BUILD_DISABLE_PCAPNG: true | |
permissions: | |
contents: read | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: read | |
outputs: | |
changed: ${{ steps.filter.outputs.src == 'true' || steps.filter.outputs.build == 'true' }} | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2 | |
id: filter | |
with: | |
filters: .github/path_filters.yml | |
build: | |
needs: changes | |
if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' && needs.changes.outputs.changed == 'true' }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
container: | |
image: quay.io/centos/centos:stream8 | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: DoozyX/clang-format-lint-action@a83a8fb7d371f66da7dd1c4f33a193023899494b # v0.16 | |
with: | |
source: '.' | |
extensions: 'hpp,h,cpp,c,cc' | |
- name: Install the build dependency | |
run: | | |
yum install -y dnf-plugins-core | |
dnf config-manager --set-enabled powertools | |
yum install -y sudo git gcc gcc-c++ meson python3 python3-pip pkg-config json-c-devel libpcap-devel gtest-devel SDL2-devel openssl-devel numactl-devel libasan | |
yum install -y dpdk-devel | |
- name: Install the python package | |
run: pip3 install pyelftools==0.29 | |
- name: Git config | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Your Name" | |
- name: Build | |
run: | | |
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig/:/usr/local/lib/pkgconfig/ | |
./build.sh | |
- name: Build with debug | |
run: | | |
rm build -rf | |
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig/:/usr/local/lib/pkgconfig/ | |
./build.sh debug |