mirror of
https://git.yoctoproject.org/meta-raspberrypi
synced 2026-10-21 05:38:11 +00:00
cancel-redundant-workflows.yml had some overhead as it was spawning an extra workflow_run job per workflow. With concurrency groups, a new push cancels the PR's previous run directly. A cancelled step can leave its docker container running against the shared sstate. Label containers with the runner name and remove them in the cleanup step. Rename docker-prune-images to docker-cleanup accordingly. Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
# SPDX-FileCopyrightText: Andrei Gherzan <andrei.gherzan@huawei.com>
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
name: Compliance
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
dco:
|
|
name: DCO
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout the code
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
- name: Build the DCO image
|
|
id: docker
|
|
uses: ./.github/actions/docker-build
|
|
with:
|
|
docker_image: dco-check
|
|
- name: Do DCO check
|
|
run: |
|
|
docker run --rm --security-opt apparmor=unconfined \
|
|
--label "meta-raspberrypi-ci.runner=$RUNNER_NAME" \
|
|
--security-opt seccomp=unconfined \
|
|
-v "$GITHUB_WORKSPACE:/work:ro" \
|
|
--env "BASE_REF=$GITHUB_BASE_REF" \
|
|
"${{ steps.docker.outputs.image }}"
|
|
- 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()
|
|
reuse:
|
|
name: reuse
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout the code
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
- name: Do reuse check
|
|
continue-on-error: true
|
|
uses: fsfe/reuse-action@676e2d560c9a403aa252096d99fcab3e1132b0f5 # v6.0.0
|