Skip to content

Merge pull request #4 from 5GC-DEV/migrate-omec-v1.0.0 #6

Merge pull request #4 from 5GC-DEV/migrate-omec-v1.0.0

Merge pull request #4 from 5GC-DEV/migrate-omec-v1.0.0 #6

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Canonical Ltd.
# Copyright 2024 Intel Corporation
name: CDAC Master workflow
on:
pull_request:
branches:
- cdacmaster
push:
branches:
- cdacmaster
workflow_dispatch:
jobs:
clang-format:
runs-on: ubuntu-latest
if: github.repository_owner == '5GC-DEV'
strategy:
matrix:
path:
- check: 'core'
exclude: '(kmod)' # Exclude "kmod" dir because of different format
- check: 'protobuf'
exclude: '' # Nothing to exclude
- check: 'sample_plugin/modules'
exclude: '' # Nothing to exclude
- check: 'sample_plugin/protobuf'
exclude: '' # Nothing to exclude
steps:
- uses: actions/checkout@v4
- name: Clang-format check
uses: jidicula/[email protected]
with:
clang-format-version: '12'
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}
check-spelling:
name: Markdown spellcheck
runs-on: ubuntu-latest
if: github.repository_owner == '5GC-DEV'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check Spelling
uses: rojopolis/[email protected]
with:
config_path: .spellcheck.yml
task_name: Markdown
hadolint:
name: hadolint
runs-on: ubuntu-latest
if: github.repository_owner == '5GC-DEV'
steps:
- uses: actions/checkout@v4
- name: Dockerfile linter
uses: hadolint/[email protected]
# For now, ignoring:
# DL3008 warning: Pin versions in apt get install (e.g., apt-get install <package>=<version>)
with:
dockerfile: env/Dockerfile
ignore: DL3008
hadolint-cndp:
name: hadolint-cndp
runs-on: ubuntu-latest
if: github.repository_owner == '5GC-DEV'
steps:
- uses: actions/checkout@v4
- name: Dockerfile linter
uses: hadolint/[email protected]
# For now, ignoring:
# DL3008 warning: Pin versions in apt get install (e.g., apt-get install <package>=<version>); and
# DL3013 warning: Pin versions in pip (e.g., pip install <package>==<version>)
with:
dockerfile: env/Dockerfile-cndp
ignore: DL3008,DL3013
license-check:
runs-on: ubuntu-latest
if: github.repository_owner == '5GC-DEV'
steps:
- uses: actions/checkout@v4
- name: reuse lint
uses: fsfe/reuse-action@v3
fossa-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: FOSSA scan
uses: fossa-contrib/fossa-action@v3
with:
fossa-api-key: 0c3bbcdf20e157bbd487dae173751b28
build:
runs-on: ubuntu-20.04
if: github.repository_owner == '5GC-DEV'
env:
REGISTRY: docker.io
DOCKER_REGISTRY: docker.io/
DOCKER_REPOSITORY: cdac5gc/
steps:
- uses: actions/checkout@v4
- name: Set permissions for rebuild_images_cdac.py
run: chmod +x ./env/rebuild_images_cdac.py
- uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DCKRUSER }}
password: ${{ secrets.DCKRPASS }}
- name: Build and push new BESS base image
run: yes y | ./env/rebuild_images_cdac.py focal64