mirror of
git://git.yoctoproject.org/meta-raspberrypi.git
synced 2025-07-05 05:04:45 +02:00

Add --security-opt apparmor=unconfined to docker cmdline. Suggested-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
# SPDX-FileCopyrightText: Andrei Gherzan <andrei.gherzan@huawei.com>
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
---
|
|
|
|
name: Yocto Compatible
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
yocto-check-layer:
|
|
name: Validate with yocto-check-layer
|
|
runs-on: [self-hosted, Linux]
|
|
steps:
|
|
- name: Checkout the code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Define Yocto build files
|
|
id: changed-files-specific
|
|
uses: tj-actions/changed-files@v24
|
|
with:
|
|
files: |
|
|
.github/actions/**
|
|
.github/workflows/docker-images/yocto-builder/**
|
|
.github/workflows/docker-images/*.sh
|
|
.github/workflows/yocto-builds.yml
|
|
classes/**
|
|
conf/**
|
|
dynamic-layers/**
|
|
files/**
|
|
lib/**
|
|
recipes-**
|
|
wic/**
|
|
- name: Build a temporary yocto-builder image
|
|
uses: ./.github/actions/docker-build
|
|
with:
|
|
docker_image: yocto-builder
|
|
id: ${{ github.event.number }}
|
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
|
- name: Run yocto-check-layer
|
|
run: |
|
|
docker run --rm --security-opt apparmor=unconfined \
|
|
-v "$GITHUB_WORKSPACE:/work:ro" \
|
|
--env "BASE_REF=$GITHUB_BASE_REF" \
|
|
"yocto-builder-${{ github.event.number }}" \
|
|
/entrypoint-yocto-check-layer.sh
|
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
|
- name: Cleanup temporary docker image
|
|
uses: ./.github/actions/docker-clean-image
|
|
with:
|
|
docker_image: yocto-builder-${{ github.event.number }}
|
|
if: always()
|
|
- name: Cleanup dangling docker images
|
|
uses: ./.github/actions/docker-clean-dangling
|
|
if: always()
|