Repository navigation
49 lines (44 loc) · 1.55 KB
/
Copy pathyocto-layer.yml
File metadata and controls
49 lines (44 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# SPDX-FileCopyrightText: Andrei Gherzan <andrei.gherzan@huawei.com>
#
# SPDX-License-Identifier: MIT
---
name: Yocto Compatible
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
yocto-check-layer:
name: Validate with yocto-check-layer
runs-on: [self-hosted, Linux]
steps:
- name: Checkout the code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Check for Yocto relevant changes
id: changed-files-specific
uses: ./.github/actions/changed-files
- name: Build the yocto-builder image
id: docker
uses: ./.github/actions/docker-build
with:
docker_image: yocto-builder
if: steps.changed-files-specific.outputs.any_changed == 'true'
- name: Run yocto-check-layer
run: |
docker run --rm --security-opt apparmor=unconfined \
--label "meta-raspberrypi-ci.runner=$RUNNER_NAME" \
-v "$GITHUB_WORKSPACE:/work:ro" \
--env "BASE_REF=$GITHUB_BASE_REF" \
"${{ steps.docker.outputs.image }}" \
/entrypoint-yocto-check-layer.sh
if: steps.changed-files-specific.outputs.any_changed == 'true'
- name: Cleanup CI docker containers and images
uses: ./.github/actions/docker-cleanup
if: always()
- name: Cleanup dangling docker images
uses: ./.github/actions/docker-clean-dangling
if: always()