From 46c4aea43c04216a0b4796a61b2bebf0bd129334 Mon Sep 17 00:00:00 2001 From: trfore Date: Wed, 3 Jul 2024 14:21:54 -0500 Subject: [PATCH] ci: refactor to use remote wf inputs --- .github/workflows/ci.yml | 42 +++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5fd1c4c..c9aff86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,44 @@ name: CI on: - workflow_dispatch: push: - branches: [main] + branches: ["*"] paths: - - 'Dockerfile' + - "Dockerfile" pull_request: + branches: ["*"] + paths-ignore: + - "**.md" + - "LICENSE" + workflow_dispatch: + +concurrency: + group: ${{ github.workflow}}-${{ github.head_ref || github.ref }} + cancel-in-progress: true jobs: - test_build: - uses: trfore/docker-image/.github/workflows/test_systemd.yml@main # remote repo + cgroup-v1: + uses: trfore/docker-image/.github/workflows/test_systemd.yml@main + with: + continue-on-error: true + runner: ubuntu-20.04 + volume-permission: ro + + cgroup-v2: + uses: trfore/docker-image/.github/workflows/test_systemd.yml@main + with: + continue-on-error: false + runner: ubuntu-22.04 + volume-permission: rw + + check: + if: always() && failure() + needs: + - cgroup-v1 + - cgroup-v2 + runs-on: ubuntu-latest + steps: + - run: >- + python -c "assert set([ + '${{ needs.cgroup-v1.result }}', + '${{ needs.cgroup-v2.result }}', + ]) == {'success'}"