mirror of
https://git.yoctoproject.org/meta-raspberrypi
synced 2026-10-22 18:08:11 +00:00
ci: cancel superseded runs with native concurrency groups
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>
This commit is contained in:
6 files changed
+32
-31
No files matched your search
@@ -9,6 +9,10 @@ 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
|
||||
@@ -31,13 +35,14 @@ jobs:
|
||||
- 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: Prune old CI docker images
|
||||
uses: ./.github/actions/docker-prune-images
|
||||
- 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
|
||||
|
||||
Reference in new issue
Block a user