From a8605d3faa87428375ceb887ec398ffb4ad277ef Mon Sep 17 00:00:00 2001 From: Xingjian Qian Date: Thu, 3 Oct 2024 19:29:29 +0000 Subject: [PATCH] ci: split workflow into multiple files --- .github/workflows/build.yaml | 17 ----------------- .github/workflows/licenses.yaml | 24 ++++++++++++++++++++++++ .github/workflows/tools.yaml | 6 ++++-- 3 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/licenses.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4a71f4a4..4d65119b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -33,20 +33,3 @@ jobs: env: TESTSYS_SELFTEST_SKIP_IMAGE_BUILDS: true TESTSYS_SELFTEST_THREADS: 1 - images: - runs-on: - group: bottlerocket - labels: bottlerocket_ubuntu-latest_16-core - steps: - - uses: actions/checkout@v4 - # Build local tools container in case we are working on a new tools release - - run: make tools - - run: make images - license-check: - # A small machine is OK for this independent job. - runs-on: ubuntu-latest - # If we already checked the PR, we don't need to check the actual push - if: ${{ github.event_name == 'pull_request' }} - steps: - - uses: actions/checkout@v4 - - run: make cargo-deny diff --git a/.github/workflows/licenses.yaml b/.github/workflows/licenses.yaml new file mode 100644 index 00000000..67dfef2d --- /dev/null +++ b/.github/workflows/licenses.yaml @@ -0,0 +1,24 @@ +name: Licenses +on: + pull_request: + paths-ignore: + - 'docs/**' + - '.github/dependabot.yml' + - 'bottlerocket/tests/workload/**' + - '**.md' + push: + paths-ignore: + - 'docs/**' + - '.github/dependabot.yml' + - 'bottlerocket/tests/workload/**' + - '**.md' + branches: [develop] +jobs: + cargo-deny: + # A small machine is OK for this independent job. + runs-on: ubuntu-latest + # If we already checked the PR, we don't need to check the actual push + if: ${{ github.event_name == 'pull_request' }} + steps: + - uses: actions/checkout@v4 + - run: make cargo-deny diff --git a/.github/workflows/tools.yaml b/.github/workflows/tools.yaml index a2e285d3..9a2ddea2 100644 --- a/.github/workflows/tools.yaml +++ b/.github/workflows/tools.yaml @@ -8,10 +8,12 @@ on: - 'tools/**' branches: [develop] jobs: - build: + images: runs-on: group: bottlerocket - labels: bottlerocket_ubuntu-latest_8-core + labels: bottlerocket_ubuntu-latest_16-core steps: - uses: actions/checkout@v4 + # Build local tools container in case we are working on a new tools release - run: make tools + - run: make images